> On Dec. 2, 2016, 11:41 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java,
> >  line 335
> > <https://reviews.apache.org/r/53747/diff/6-7/?file=1574397#file1574397line335>
> >
> >     What if the cluster name is provided, but doesn't exist (due to a 
> > rename) - now we'd lose heartbeats then too, right?

What if the cluster name is provided, but doesn't exist (due to a rename)  
>> Isn't that a bug by itself?

Moreover, ClustersImpl.getCluster() and ClusterImpl.getService() throw an 
exception if the retrieved cluster or service object is null, which is a bad 
design. Getters/setters should not throw exceptions, just return the object 
(null or not). Because of this, there is no way of verifying if the cluster or 
service objects are null, other than to handle the exception and ignoring it 
(which is bad). 

Stage.java::addGenericExecutionCommand() could be a better place to put this 
logic.


- Nahappan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53747/#review157803
-----------------------------------------------------------


On Dec. 2, 2016, 10:18 a.m., Nahappan Somasundaram wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53747/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2016, 10:18 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Robert Levas, and 
> Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18888
>     https://issues.apache.org/jira/browse/AMBARI-18888
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> AMBARI-18888: Ambari-agent: Create configuration files with JCEKS information
> 
> 
> Diffs
> -----
> 
>   ambari-agent/conf/unix/ambari-agent.ini 
> 61948d4b1f5db37f0c9800a01187ede2cb8f92f2 
>   ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
> 11c8cbedbf4e3c9d3325090421dc2011a8e56668 
>   ambari-agent/src/packages/tarball/all.xml 
> c4812087976f9ec38c20d92c20747eb8988d8290 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
>  ef1ee4fb4f7480821c78f2149f438ce3fcd249de 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
>  75bef3027bf00117c1d423c01af936cf8f45ed1c 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
>  a50a1162a4b1ee6604e641a1a21ecf3f15fe96fa 
> 
> Diff: https://reviews.apache.org/r/53747/diff/
> 
> 
> Testing
> -------
> 
> ** 1. mvn clean install -DskipTests **
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Main ....................................... SUCCESS [7.433s]
> [INFO] Apache Ambari Project POM ......................... SUCCESS [0.040s]
> [INFO] Ambari Web ........................................ SUCCESS [1:11.223s]
> [INFO] Ambari Views ...................................... SUCCESS [1.128s]
> [INFO] Ambari Admin View ................................. SUCCESS [6.366s]
> [INFO] utility ........................................... SUCCESS [0.359s]
> [INFO] ambari-metrics .................................... SUCCESS [0.721s]
> [INFO] Ambari Metrics Common ............................. SUCCESS [6.490s]
> [INFO] Ambari Metrics Hadoop Sink ........................ SUCCESS [3.222s]
> [INFO] Ambari Metrics Flume Sink ......................... SUCCESS [1.221s]
> [INFO] Ambari Metrics Kafka Sink ......................... SUCCESS [1.192s]
> [INFO] Ambari Metrics Storm Sink ......................... SUCCESS [1.991s]
> [INFO] Ambari Metrics Storm Sink (Legacy) ................ SUCCESS [1.501s]
> [INFO] Ambari Metrics Collector .......................... SUCCESS [9.142s]
> [INFO] Ambari Metrics Monitor ............................ SUCCESS [2.627s]
> [INFO] Ambari Metrics Grafana ............................ SUCCESS [0.828s]
> [INFO] Ambari Metrics Assembly ........................... SUCCESS [1:13.892s]
> [INFO] Ambari Server ..................................... SUCCESS [2:28.842s]
> [INFO] Ambari Functional Tests ........................... SUCCESS [1.071s]
> [INFO] Ambari Agent ...................................... SUCCESS [25.738s]
> [INFO] Ambari Client ..................................... SUCCESS [0.050s]
> [INFO] Ambari Python Client .............................. SUCCESS [0.945s]
> [INFO] Ambari Groovy Client .............................. SUCCESS [1.984s]
> [INFO] Ambari Shell ...................................... SUCCESS [0.035s]
> [INFO] Ambari Python Shell ............................... SUCCESS [0.653s]
> [INFO] Ambari Groovy Shell ............................... SUCCESS [0.782s]
> [INFO] ambari-logsearch .................................. SUCCESS [0.299s]
> [INFO] Ambari Logsearch Appender ......................... SUCCESS [0.200s]
> [INFO] Ambari Logsearch Solr Client ...................... SUCCESS [1.170s]
> [INFO] Ambari Logsearch Portal ........................... SUCCESS [7.326s]
> [INFO] Ambari Logsearch Log Feeder ....................... SUCCESS [3.665s]
> [INFO] Ambari Logsearch Assembly ......................... SUCCESS [0.091s]
> [INFO] Ambari Logsearch Integration Test ................. SUCCESS [0.372s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 6:23.315s
> [INFO] Finished at: Mon Nov 14 13:44:45 PST 2016
> [INFO] Final Memory: 327M/1187M
> [INFO] 
> ------------------------------------------------------------------------
> 
> ** 2. mvn test -DskipPythonTests -Dtest=*ExecutionCommand*,*HeartBeatHandler* 
> **
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Picked up _JAVA_OPTIONS: -Xmx2048m -XX:MaxPermSize=512m 
> -Djava.awt.headless=true
> Running org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.124 sec - 
> in org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest
> 
> Results :
> 
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 27.443s
> [INFO] Finished at: Mon Nov 14 15:26:42 PST 2016
> [INFO] Final Memory: 51M/544M
> [INFO] 
> ------------------------------------------------------------------------
> 
> ** 3. Manual Tests **
> 
> Copied the ambari-server JAR from the local build to a VM. Also copied 
> CustomServiceOrchestrator.py and hadoop-common and hadoop-auth libs to 
> /var/lib/ambari-agent/lib on the VM. 
> 
> Installed HIVE and started it. Verified that the command JSON did not contain 
> clear text passwords. JCEKS provider file was generated as 
> /etc/hive/hive-site.jceks.
> 
> 
> Thanks,
> 
> Nahappan Somasundaram
> 
>

Reply via email to