EdColeman commented on a change in pull request #2232:
URL: https://github.com/apache/accumulo/pull/2232#discussion_r689572433



##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
##########
@@ -81,27 +82,30 @@
   public static final Set<Integer> CAN_RUN =
       Set.of(SHORTEN_RFILE_KEYS, CRYPTO_CHANGES, DATA_VERSION);
   public static final Set<Integer> NEEDS_UPGRADE = Sets.difference(CAN_RUN, 
Set.of(DATA_VERSION));
+  public static final String TABLE_DIR = "tables";
+  public static final String RECOVERY_DIR = "recovery";
+  public static final String WAL_DIR = "wal";
 
-  private static Set<String> baseUris = null;
-
-  private static List<Pair<Path,Path>> replacementsList = null;
+  private Set<String> baseUris;
+  private final List<Pair<Path,Path>> replacementsList;
+  private final AccumuloConfiguration conf;
+  private final Configuration hadoopConf;
 
-  public static Set<String> getBaseUris(ServerContext context) {
-    return getBaseUris(context.getConfiguration(), context.getHadoopConf());
+  public ServerConstants(AccumuloConfiguration conf, Configuration hadoopConf) 
{
+    this.conf = Objects.requireNonNull(conf);

Review comment:
       ```suggestion
   this.conf = Objects.requireNonNull(conf, "Configuration cannot be null);
   ```

##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
##########
@@ -81,27 +82,30 @@
   public static final Set<Integer> CAN_RUN =
       Set.of(SHORTEN_RFILE_KEYS, CRYPTO_CHANGES, DATA_VERSION);
   public static final Set<Integer> NEEDS_UPGRADE = Sets.difference(CAN_RUN, 
Set.of(DATA_VERSION));
+  public static final String TABLE_DIR = "tables";
+  public static final String RECOVERY_DIR = "recovery";
+  public static final String WAL_DIR = "wal";
 
-  private static Set<String> baseUris = null;
-
-  private static List<Pair<Path,Path>> replacementsList = null;
+  private Set<String> baseUris;
+  private final List<Pair<Path,Path>> replacementsList;
+  private final AccumuloConfiguration conf;
+  private final Configuration hadoopConf;
 
-  public static Set<String> getBaseUris(ServerContext context) {
-    return getBaseUris(context.getConfiguration(), context.getHadoopConf());
+  public ServerConstants(AccumuloConfiguration conf, Configuration hadoopConf) 
{
+    this.conf = Objects.requireNonNull(conf);
+    this.hadoopConf = Objects.requireNonNull(hadoopConf);

Review comment:
       ```suggestion
   this.hadoopConf = Objects.requireNonNull(hadoopConf, "Hadoop configuration 
cannot be null");
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to