HBASE-17803 Addendum fix NPE
This commit is contained in:
parent
23abc90068
commit
261aa9445c
|
@ -43,6 +43,7 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
@ -325,7 +326,8 @@ public class PerformanceEvaluation extends Configured implements Tool {
|
|||
// recreate the table when user has requested presplit or when existing
|
||||
// {RegionSplitPolicy,replica count} does not match requested.
|
||||
if ((exists && opts.presplitRegions != DEFAULT_OPTS.presplitRegions)
|
||||
|| (!isReadCmd && desc != null && !desc.getRegionSplitPolicyClassName().equals(opts.splitPolicy))
|
||||
|| (!isReadCmd && desc != null &&
|
||||
!StringUtils.equals(desc.getRegionSplitPolicyClassName(), opts.splitPolicy))
|
||||
|| (!isReadCmd && desc != null && desc.getRegionReplication() != opts.replicas)) {
|
||||
needsDelete = true;
|
||||
// wait, why did it delete my table?!?
|
||||
|
|
Loading…
Reference in New Issue