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




llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java
Lines 478 (patched)
<https://reviews.apache.org/r/71871/#comment306919>

    Hey Attila,
    
    With Java's short circuiting the the left expression in the && operarator 
will always be evaluated which could also throw the error you are trying to 
avoid -- to safeguard this operation you would place the **nodeName.length() > 
workerNodePrefix.length()** check on the left part of the expression.


- Panos Garefalakis


On Dec. 4, 2019, 11:05 a.m., Attila Magyar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71871/
> -----------------------------------------------------------
> 
> (Updated Dec. 4, 2019, 11:05 a.m.)
> 
> 
> Review request for hive, Laszlo Bodor, prasanthj, and Slim Bouguerra.
> 
> 
> Bugs: HIVE-22577
>     https://issues.apache.org/jira/browse/HIVE-22577
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> The sequence number from the worker node name might be missing under some 
> circumstances (the root cause is not fully clear it might be a zookeeper bug).
> 
> In this case the following exception occurs:
> 
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of 
> range: -1Caused by: java.lang.StringIndexOutOfBoundsException: String index 
> out of range: -1 at java.lang.String.substring(String.java:1931) at 
> org.apache.hadoop.hive.registry.impl.ZkRegistryBase.extractSeqNum(ZkRegistryBase.java:781)
>  at 
> org.apache.hadoop.hive.registry.impl.ZkRegistryBase.populateCache(ZkRegistryBase.java:507)
>  at 
> org.apache.hadoop.hive.llap.registry.impl.LlapZookeeperRegistryImpl.access$000(LlapZookeeperRegistryImpl.java:65)
>  at
> 
> 
> Diffs
> -----
> 
>   
> llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java 
> 5751b8ed939 
> 
> 
> Diff: https://reviews.apache.org/r/71871/diff/1/
> 
> 
> Testing
> -------
> 
> qtest
> 
> 
> Thanks,
> 
> Attila Magyar
> 
>

Reply via email to