Can I replace rpm package in HDP, such as replace zeppelin_2_5_0_0_1245-0.6.0.2.5.0.0-1245.el6.noarch.rpm to my rpm package?
If you want to upgrade individual components from Ambari then Ambari currently only supports upgrading the entire HDP stack together. However, However according to JIRA "patch upgrades" (https://issues.apache.org/jira/browse/AMBARI-12556) which would allow users to upgrade only a single component of the stack. This is targetted for the 3.0 release.
However If you manually want to change the RPM of Zeppelin then you should be able to do it but it will not be supported because that will lead to an untested and uncertified combination of components in the HDP stack.
You should stick to the components which are shipped with the whole HDP stack. These are tested and certified together.
You can find the apache zeppelin github code here:
git clone git://git.apache.org/zeppelin.git zeppelin
And for further information on building apache zeppelin you can refer to: https://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/development/howtocontribute.html#git-access