[ 
https://issues.apache.org/jira/browse/HBASE-4481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121081#comment-13121081
 ] 

stack commented on HBASE-4481:
------------------------------

Here is a little patch:

{code}
pynchon-590:clean-trunk stack$ svn diff
Index: src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java
===================================================================
--- src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java       
(revision 1179278)
+++ src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java       
(working copy)
@@ -60,6 +60,11 @@
   public void setUp() throws Exception {
     // Set the timeout down else this test will take a while to complete.
     this.conf.setLong("hbase.zookeeper.recoverable.waittime", 1000);
+    // Make it so we try and connect to a zk that is not there (else we might
+    // find a zk ensemble put up by another concurrent test and this will
+    // mess up this test.  Choose unlikely port. Default test port is 21818.
+    // Default zk port is 2181.
+    this.conf.setInt("hbase.zookeeper.property.clientPort", 10001);
 
     this.conf.set("hbase.hstore.compactionThreshold", "2");
 
{code}

Let me apply it and see if it helps.
                
> TestMergeTool failed in 0.92 build 20
> -------------------------------------
>
>                 Key: HBASE-4481
>                 URL: https://issues.apache.org/jira/browse/HBASE-4481
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>         Attachments: 4481-dbg.txt
>
>
> TestMergeTool failed due to the following exception:
> {code}
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>       at java.lang.String.substring(String.java:1937)
>       at org.apache.hadoop.hbase.ServerName.parseHostname(ServerName.java:81)
>       at org.apache.hadoop.hbase.ServerName.<init>(ServerName.java:63)
>       at 
> org.apache.hadoop.hbase.MasterAddressTracker.getMasterAddress(MasterAddressTracker.java:62)
>       at 
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:583)
>       at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:108)
>       at 
> org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:1588)
>       at org.apache.hadoop.hbase.util.Merge.run(Merge.java:94)
>       at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>       at 
> org.apache.hadoop.hbase.util.TestMergeTool.mergeAndVerify(TestMergeTool.java:186)
>       at 
> org.apache.hadoop.hbase.util.TestMergeTool.testMergeTool(TestMergeTool.java:264)
> {code}
> Log can be found at:
> https://builds.apache.org/view/G-L/view/HBase/job/HBase-0.92/20/testReport/junit/org.apache.hadoop.hbase.util/TestMergeTool/testMergeTool/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to