Skip to content

Commit 9179326

Browse files
committed
Add more defaults to ONDEMAND
1 parent ba0ea84 commit 9179326

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

core/src/main/java/org/apache/accumulo/core/clientImpl/ImportConfigurationImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public Builder setKeepMappings(boolean keepMappings) {
4848

4949
@Override
5050
public Builder setInitialHostingGoal(TabletHostingGoal initialTabletHostingGoal) {
51-
Preconditions.checkState(initialTabletHostingGoal != null, "initialTabletHostingGoal is null");
5251
Preconditions.checkState(!built, BUILT_ERROR_MSG);
52+
Preconditions.checkState(initialTabletHostingGoal != null, "initialTabletHostingGoal is null");
5353
this.initialHostingGoal = initialTabletHostingGoal;
5454
return this;
5555
}

server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableImport/ImportTable.java

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
import org.slf4j.Logger;
5151
import org.slf4j.LoggerFactory;
5252

53+
import com.google.common.base.Preconditions;
54+
5355
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
5456

5557
/**
@@ -71,6 +73,7 @@ public ImportTable(String user, String tableName, Set<String> exportDirs, Namesp
7173
tableInfo.directories = parseExportDir(exportDirs);
7274
tableInfo.keepMappings = keepMappings;
7375
tableInfo.keepOffline = keepOffline;
76+
Preconditions.checkState(initialHostingGoal != null, "initialHostingGoal is null");
7477
tableInfo.initialHostingGoal = initialHostingGoal;
7578
}
7679

server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableImport/ImportedTableInfo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ImportedTableInfo implements Serializable {
3737
public String exportFile;
3838
public boolean keepMappings;
3939
public boolean keepOffline;
40-
public TabletHostingGoal initialHostingGoal;
40+
public TabletHostingGoal initialHostingGoal = TabletHostingGoal.ONDEMAND;
4141

4242
static class DirectoryMapping implements Serializable {
4343
private static final long serialVersionUID = 1L;

0 commit comments

Comments
 (0)