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

stack commented on HBASE-12762:
-------------------------------

[~apurtell] I took a look and saw this:

14/12/30 07:49:47 INFO mortbay.log: Extract 
jar:file:/home/jenkins/jenkins-slave/workspace/HBase-0.98-on-Hadoop-1.1/hbase-server/target/hbase-server-0.98.10-SNAPSHOT.jar!/hbase-webapps/regionserver
 to /tmp/Jetty_0_0_0_0_38973_regionserver____6v0l18/webapp
14/12/30 07:49:47 INFO mortbay.log: Started [email protected]:38973
14/12/30 07:49:47 INFO http.HttpServer: Added global filtersafety 
(class=org.apache.hadoop.http.HttpServer$QuotingInputFilter)
14/12/30 07:49:47 INFO http.HttpServer: Port returned by 
webServer.getConnectors()[0].getLocalPort() before open() is -1. Opening the 
listener on 60010
14/12/30 07:49:47 FATAL master.HMaster: Unhandled exception. Starting shutdown.
java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind(Native Method)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at 
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
        at org.apache.hadoop.http.HttpServer.start(HttpServer.java:602)
        at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:666)
        at java.lang.Thread.run(Thread.java:662)


And it just passed. Let me try it again to see if permanent failing going on.

> Region with no hfiles will have the highest locality cost in 
> LocalityCostFunction
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-12762
>                 URL: https://issues.apache.org/jira/browse/HBASE-12762
>             Project: HBase
>          Issue Type: Improvement
>          Components: Balancer
>    Affects Versions: 0.99.2
>            Reporter: cuijianwei
>            Assignee: cuijianwei
>            Priority: Minor
>             Fix For: 1.0.0, 2.0.0, 0.98.10, 1.1.0
>
>         Attachments: HBASE-12762-trunk.patch
>
>
> The locality cost of region will be computed in LocalityCostFunction.cost as:
> {code}
> double cost() {
>         ...
>         int index = -1;
>         for (int j = 0; j < regionLocations.length; j++) {
>           if (regionLocations[j] >= 0 && regionLocations[j] == serverIndex) {
>             index = j;
>             break;
>           }
>         }
>         if (index < 0) {
>           cost += 1;  // ==> region with no hfiles will have the highest cost
>         } else {
>           cost += (double) index / (double) regionLocations.length;
>         }
>         ...
>     }
> {code}
> The region with no hfiles(such as empty region) will have the highest cost 
> which represents the worst case that region located in the server with no 
> locality for hfiles. However, this might be the best case because there are 
> no hlogs for the region. Although the absolute cost value won't affect the 
> balance process, will it be more reasonable to have zero cost for such 
> regions? such as:
> {code}
>    ...
>         if (index < 0) {
>           if (regionLocation.length > 0) { //  ==> only consider regions with 
> hfiles
>               cost += 1;
>           }
>         } else {
>           cost += (double) index / (double) regionLocations.length;
>         }
>    ...
> {code} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to