You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Nitay Joffe (JIRA)" <ji...@apache.org> on 2009/03/20 06:00:50 UTC

[jira] Created: (HBASE-1271) Allow multiple tests to run on one machine

Allow multiple tests to run on one machine
------------------------------------------

                 Key: HBASE-1271
                 URL: https://issues.apache.org/jira/browse/HBASE-1271
             Project: Hadoop HBase
          Issue Type: Improvement
          Components: test
            Reporter: Nitay Joffe
            Assignee: Nitay Joffe
            Priority: Minor
             Fix For: 0.19.2


Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702549#action_12702549 ] 

Nitay Joffe commented on HBASE-1271:
------------------------------------

I don't think that's true Evgeny. LocalHBaseCluster is used for users in "local" mode. Testing uses MiniHBaseCluster, which calls out to a LocalHBaseCluster. From HMaster code:

{code}
          // If 'local', defer to LocalHBaseCluster instance.
          if (LocalHBaseCluster.isLocal(conf)) {
            (new LocalHBaseCluster(conf)).startup();
          } else {
            Constructor<? extends HMaster> c =
              masterClass.getConstructor(HBaseConfiguration.class);
            HMaster master = c.newInstance(conf);
            master.start();
          }
{code}

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeny Ryabitskiy updated HBASE-1271:
-------------------------------------

    Status: Patch Available  (was: Open)

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nitay Joffe updated HBASE-1271:
-------------------------------

    Fix Version/s:     (was: 0.19.2)
                   0.20.0

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Nitay Joffe
>            Priority: Minor
>             Fix For: 0.20.0
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeny Ryabitskiy updated HBASE-1271:
-------------------------------------

    Attachment: HBASE-1271_v2.patch

 * moved port++ from  LocalHBaseCluster to MiniHBaseCluster level

 * fixed spelling :)

 * Still auto port binding for Info Server. I think it is really useful.

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeny Ryabitskiy updated HBASE-1271:
-------------------------------------

    Attachment: HBASE-1271_v3.patch

Everything done as mr. Stack wished. :)

To enable auto port binding for info servers use:
{code}
  <property>
    <name>hbase.regionserver.info.port.auto</name>
    <value>false</value>
    <description>Info server auto port bind. Enables automatic port
    search if hbase.regionserver.info.port is already in use.
    Useful for testing, turned off by default.
    </description>
  </property>
{code}

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch, HBASE-1271_v3.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702551#action_12702551 ] 

Evgeny Ryabitskiy commented on HBASE-1271:
------------------------------------------

I know about it..... but for what is used local mode? I guess for testing.
If you want local DB you can run MySQL.... or something else

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeny Ryabitskiy updated HBASE-1271:
-------------------------------------

    Attachment: HBASE-1271.patch

Fixing to region server:

 * Previously all info servers for HRS were bind on one port, so it was imposible to start multiple HRS with info servers on one node
 * Now if port is in use, info server binds on next port (port++)

{code}
09/04/24 14:01:54 INFO regionserver.HRegionServer: Faild binding http info server to port: 60030
 09/04/24 14:01:54 INFO regionserver.HRegionServer: Attempt to bind http info server to port: 60031
{code}

Fixing to test framework:

 * LocalHBaseCluster. If Masters port is busy... try port++
 * MiniZooKeeperCluster. Same thing if port is busy try next one.


Still need to check working of MiniZooKeeperCluster. Not shure for my changes.


How I was testing my changes:

 * Run 3 HRS and master on one laptop (info server is turned on), everything is working... jsp GUI for master show links for all HRS info servers

 * Run ant test task with all tests... + running at same time JUnits... no colisions
 * Run 2 ant tasks with all tests at same time. No collisions.

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702926#action_12702926 ] 

Nitay Joffe commented on HBASE-1271:
------------------------------------

Looks good to me, assuming the auto port binding for info server is okay. What do other folks think?

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702565#action_12702565 ] 

Evgeny Ryabitskiy commented on HBASE-1271:
------------------------------------------

Have an idea.... we can add parameter to config (hbase-site)...
parameter name: auto.port.binding
value: true/false

To enable or disable this future. Suggest to turn on it by default. New users loves to play with local mode but don't like to reconfigure hbase... and manually setting another port....


Same pram can be done for InfoServer port

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702527#action_12702527 ] 

Evgeny Ryabitskiy commented on HBASE-1271:
------------------------------------------

 * LocalHBaseCluster - is not so general thing... as I understand it is used for testing.. never for real cluster... so my change will simplify this testing by providing another port.

 * HRS InfoServer is really general thing... but port of InfoServer is not so critical...  we can document it like a future... "Automatic InfoServer port binding". And if you want explicit port setting we can add console param for HRS start
without this changes we cant star't several HRS on one node with info servers

 * thx... will fix my spelling 

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702527#action_12702527 ] 

Evgeny Ryabitskiy edited comment on HBASE-1271 at 4/24/09 1:22 PM:
-------------------------------------------------------------------

 * LocalHBaseCluster - is not so general thing... as I understand it is used for testing.. never for real cluster... so my change will simplify this testing by providing automatic another port binding.

 * HRS InfoServer is really general thing... but port of InfoServer is not so critical...  we can document it like a future... "Automatic InfoServer port binding". And if you want explicit port setting we can add console param for HRS start
without this changes we cant star't several HRS on one node with info servers

 * thx... will fix my spelling 

      was (Author: apparition):
     * LocalHBaseCluster - is not so general thing... as I understand it is used for testing.. never for real cluster... so my change will simplify this testing by providing another port.

 * HRS InfoServer is really general thing... but port of InfoServer is not so critical...  we can document it like a future... "Automatic InfoServer port binding". And if you want explicit port setting we can add console param for HRS start
without this changes we cant star't several HRS on one node with info servers

 * thx... will fix my spelling 
  
> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702334#action_12702334 ] 

Evgeny Ryabitskiy edited comment on HBASE-1271 at 4/24/09 5:15 AM:
-------------------------------------------------------------------

Nitay, I hope you will look throw my changes to MiniZooKeeperCluster
maybe something can go to ZK testing core

P.S. Thx, larsgeorge for help!

      was (Author: apparition):
    Nitay, I hope you will look throw my changes to MiniZooKeeperCluster
maybe something can go to ZK testing core
  
> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702555#action_12702555 ] 

Evgeny Ryabitskiy commented on HBASE-1271:
------------------------------------------

Anyway I can try to move port changes to MiniHBaseCluster level....
But are we really need it?
If user starts second hbase locally... without changing config (same jar), he will  get something like this:

"Hey! this port is busy. I found another port and bind to it. So have a rest and don't worry about reconfiguring and other stuff."

Will user be so disappoint because of it? :)

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeny Ryabitskiy reassigned HBASE-1271:
----------------------------------------

    Assignee: Evgeny Ryabitskiy  (was: Nitay Joffe)

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-1271:
-------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed.  In testing, there seem to be issues with hdfs still but this is a good start.  Thanks for the patch Evgeny.

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch, HBASE-1271_v3.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702946#action_12702946 ] 

Evgeny Ryabitskiy commented on HBASE-1271:
------------------------------------------

About effect of adding auto binding:

 * HBase will work same in all cases when it was working (running one HRS with info server per node)

 * But after patch it  will work in cases when HBase wasn't working (run several hrs with info servers that all trying to bind to same port bring an error)

So the scope of hbase usage is extended.

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704003#action_12704003 ] 

stack commented on HBASE-1271:
------------------------------

Evgeny:

I think the port++ should only be in test context.  Elsewhere, if already service on the named port, I think it more helpful if we fail to bind (Other service could be old instance of hbase or a service user didn't realize they had).  Port++, user will have to hunt for UI.  So I like your idea of the auto.port config. with it being off by default but on in tests (See at src/test/hbase-site.xml the configuration we use in test context -- it could be on here).

Just by way of FYI, LocalHBaseCluster, as Nitay says above is not just for testing.  Its the default server used when you start up hbase.  Its kinda weird because you would never use it in a production context but it has to work really well because its what new people try first; if this don't work well, then they won't stick around to try more of hbase.

Your patch has ^M (Carriage returns) in it.  Can you purge them?

I'd suggest you put the two log lines below together as one:

+          LOG.info("Failed binding http info server to port: " + port);

+          port++;

+          LOG.info("Attempt to bind http info server to port: " + port);


Do it in all BindException handlers, I'd suggest.

Otherwise, patch looks great.

Thanks E.

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch, HBASE-1271_v2.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702491#action_12702491 ] 

Nitay Joffe commented on HBASE-1271:
------------------------------------

Evgeny,

- I like your approach with the ++port, but we need to note that you are changing it for the general use case, not just the tests. Any use of RegionServer or LocalHBaseCluster will now have the ++port logic in it. This means that a user who sets his port in a config to 5000 may spin up a server on port 5002 instead of producing an error. It's not clear to me that that is a good change necessarily?

- LOG.info("Faild binding Master to ... should fix spelling of "Failed"

Looks great on the ZooKeeper side of things and otherwise. Thanks for taking this on :).


> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1271) Allow multiple tests to run on one machine

Posted by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702334#action_12702334 ] 

Evgeny Ryabitskiy commented on HBASE-1271:
------------------------------------------

Nitay, I hope you will look throw my changes to MiniZooKeeperCluster
maybe something can go to ZK testing core

> Allow multiple tests to run on one machine
> ------------------------------------------
>
>                 Key: HBASE-1271
>                 URL: https://issues.apache.org/jira/browse/HBASE-1271
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Nitay Joffe
>            Assignee: Evgeny Ryabitskiy
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1271.patch
>
>
> Currently, if we try to run two tests on one machine (e.g. in two checkouts) the second one will fail because its servers won't be able to bind to ports. We should use random ports in our servers in the tests to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.