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

Mike Drob commented on HBASE-20786:
-----------------------------------

There's already a comment in RegionLocationFinder about
{noformat}
  // Do not scheduleFullRefresh at master startup
  private long lastFullRefresh = EnvironmentEdgeManager.currentTime();
{noformat}

On the other hand, if we don't wait for the locality information to populate on 
startup, then... it will all get called (synchronously, I think?) the first 
time we try to generate an assignment map, which looks like it happens... well 
before the point you've gotten to? That doesn't make sense...

I set some breakpoints and it looks like the assignment manager thread will 
have already started trying to do assignments by the time we get to that 
{{BaseLoadBalancer.postMasterStartupInitialize}} method. At a minimum, we 
should have already built an initial cache via 
{{assignmentManager.joinCluster()}} which will try to process all of the 
offline regions (and needs locality information on how to proceed with them). 
I'm not sure why the long wait appears at the end where you see it instead of 
earlier when we need locality information.

I think Allan is right that we can delegate to a thread. [~stack] - I'll upload 
a patch based on that idea, can you apply it and test wherever you are seeing 
this slow startup or is that too cumbersome? If so, I'll figure out how to 
create a reproduction locally.



> Table create with thousands of regions takes too long
> -----------------------------------------------------
>
>                 Key: HBASE-20786
>                 URL: https://issues.apache.org/jira/browse/HBASE-20786
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Performance
>            Reporter: stack
>            Priority: Major
>
> Internal testing has create of a table with 33k regions taking 18 minutes. 
> Let me provide more info below. We have an executor with default ten threads 
> handling the creation of the regions in HDFS which helps distribute out the 
> load but its not enough. This cluster had >600 servers. Let me add detail.
> Need to spend some time on speeding up create/assigns. Made this an umbrella 
> issue so can pick off pieces of the problem as subtasks.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to