You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org> on 2016/11/29 23:58:45 UTC

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Till Westmann has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1367

Change subject: ASTERIXDB-1711: root metadata
......................................................................

ASTERIXDB-1711: root metadata

s/asterix_root_metadata/root_metadata/
s/AsterixConstants/StorageConstants/

Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
---
R asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
M asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
M asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
M asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
M asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
5 files changed, 15 insertions(+), 19 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/67/1367/1

diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/AsterixConstants.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
similarity index 81%
rename from asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/AsterixConstants.java
rename to asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
index 4bca216..382c94b 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/AsterixConstants.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
@@ -19,12 +19,11 @@
 package org.apache.asterix.common.utils;
 
 /**
- * A static class that stores asterix constants
+ * A static class that stores storage constants
  */
-public class AsterixConstants {
-    public static final String ASTERIX_ROOT_METADATA_DIR = "asterix_root_metadata";
+public class StorageConstants {
+    public static final String METADATA_ROOT = "root_metadata";
 
-    private AsterixConstants() {
+    private StorageConstants() {
     }
-
 }
diff --git a/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java b/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
index 9c6725b..71cef80 100644
--- a/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
+++ b/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
@@ -27,7 +27,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.utils.AsterixConstants;
+import org.apache.asterix.common.utils.StorageConstants;
 import org.apache.asterix.event.driver.EventDriver;
 import org.apache.asterix.event.error.VerificationUtil;
 import org.apache.asterix.event.model.AsterixInstance;
@@ -43,8 +43,6 @@
 import org.apache.asterix.event.schema.pattern.Value;
 import org.apache.asterix.event.service.AsterixEventService;
 import org.apache.asterix.event.service.AsterixEventServiceUtil;
-import org.apache.asterix.event.service.ILookupService;
-import org.apache.asterix.event.service.ServiceProvider;
 import org.apache.asterix.installer.schema.conf.Backup;
 
 public class PatternCreator {
@@ -145,7 +143,7 @@
             Nodeid nodeid = new Nodeid(new Value(null, node.getId()));
             iodevices = node.getIodevices() == null ? instance.getCluster().getIodevices() : node.getIodevices();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + store + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
+                    + StorageConstants.METADATA_ROOT + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
                     + backupId + " " + hdfsBackupDir + " " + "hdfs" + " " + node.getId() + " " + hdfsUrl + " "
                     + hadoopVersion;
             Event event = new Event("backup", nodeid, pargs);
@@ -170,7 +168,7 @@
             iodevices = node.getIodevices() == null ? instance.getCluster().getIodevices() : node.getIodevices();
             txnLogDir = node.getTxnLogDir() == null ? instance.getCluster().getTxnLogDir() : node.getTxnLogDir();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + store + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + txnLogDir + " " + backupId + " " + backupDir
+                    + StorageConstants.METADATA_ROOT + " " + txnLogDir + " " + backupId + " " + backupDir
                     + " " + "local" + " " + node.getId();
             Event event = new Event("backup", nodeid, pargs);
             patternList.add(new Pattern(null, 1, null, event));
@@ -193,7 +191,7 @@
             Nodeid nodeid = new Nodeid(new Value(null, node.getId()));
             String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + clusterStore + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
+                    + StorageConstants.METADATA_ROOT + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
                     + backupId + " " + " " + hdfsBackupDir + " " + "hdfs" + " " + node.getId() + " " + hdfsUrl + " "
                     + hadoopVersion;
             Event event = new Event("restore", nodeid, pargs);
@@ -214,7 +212,7 @@
             Nodeid nodeid = new Nodeid(new Value(null, node.getId()));
             String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + clusterStore + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
+                    + StorageConstants.METADATA_ROOT + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
                     + backupId + " " + backupDir + " " + "local" + " " + node.getId();
             Event event = new Event("restore", nodeid, pargs);
             patternList.add(new Pattern(null, 1, null, event));
@@ -449,7 +447,7 @@
         for (Node node : cluster.getNode()) {
             String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
             String primaryIODevice = iodevices.split(",")[0].trim();
-            pargs = primaryIODevice + File.separator + AsterixConstants.ASTERIX_ROOT_METADATA_DIR;
+            pargs = primaryIODevice + File.separator + StorageConstants.METADATA_ROOT;
             nodeid = new Nodeid(new Value(null, node.getId()));
             event = new Event("file_delete", nodeid, pargs);
             patternList.add(new Pattern(null, 1, null, event));
diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
index 9028e4c..22b6952 100644
--- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
+++ b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
@@ -36,8 +36,6 @@
 
 public class BackupCommand extends AbstractCommand {
 
-    public static final String ASTERIX_ROOT_METADATA_DIR = "asterix_root_metadata";
-
     @Override
     protected void execCommand() throws Exception {
         InstallerDriver.initConfig(true);
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
index 8600efb..6ccc6d0 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
@@ -45,6 +45,7 @@
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.replication.AsterixReplicationJob;
 import org.apache.asterix.common.replication.IReplicationManager;
+import org.apache.asterix.common.utils.StorageConstants;
 import org.apache.asterix.common.utils.StoragePathUtil;
 import org.apache.commons.io.FileUtils;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -67,8 +68,8 @@
     public static final String METADATA_FILE_NAME = ".metadata";
     // Private constants
     private static final Logger LOGGER = Logger.getLogger(PersistentLocalResourceRepository.class.getName());
-    private static final String STORAGE_METADATA_DIRECTORY = "root_metadata";
-    private static final String STORAGE_METADATA_FILE_NAME_PREFIX = ".root_metadata";
+    private static final String STORAGE_METADATA_DIRECTORY = StorageConstants.METADATA_ROOT;
+    private static final String STORAGE_METADATA_FILE_NAME_PREFIX = "." + StorageConstants.METADATA_ROOT;
     private static final long STORAGE_LOCAL_RESOURCE_ID = -4321;
     private static final int MAX_CACHED_RESOURCES = 1000;
     private static final FilenameFilter METADATA_FILES_FILTER = (File dir, String name) -> name.equalsIgnoreCase(
diff --git a/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java b/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
index 00d9018..56d3d07 100644
--- a/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
+++ b/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
@@ -47,7 +47,7 @@
 
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.event.schema.cluster.Property;
+import org.apache.asterix.common.utils.StorageConstants;
 import org.apache.asterix.event.schema.yarnCluster.Cluster;
 import org.apache.asterix.event.schema.yarnCluster.MasterNode;
 import org.apache.asterix.event.schema.yarnCluster.Node;
@@ -1288,7 +1288,7 @@
                     FileStatus[] backups = fs.listStatus(new Path(src.toString()));
                     for (FileStatus b : backups) {
                         if (!b.getPath().toString().contains("txnLogs")
-                                && !b.getPath().toString().contains(File.separator + "asterix_root_metadata")) {
+                                && !b.getPath().toString().contains(File.separator + StorageConstants.METADATA_ROOT)) {
                             vargs.add(b.getPath() + "," + s + File.separator + clusterDesc.getStore());
                         }
                     }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1711: root metadata
......................................................................


Patch Set 1:

Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1213/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: abdullah alamoudi <ba...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1711: root metadata
......................................................................


Patch Set 1: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1213/ : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: abdullah alamoudi <ba...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1711: root metadata
......................................................................


Patch Set 1:

Yes, that change was very recent and not well advertised ... but I think we're ok now, right?

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: abdullah alamoudi <ba...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has submitted this change and it was merged.

Change subject: ASTERIXDB-1711: root metadata
......................................................................


ASTERIXDB-1711: root metadata

s/asterix_root_metadata/root_metadata/
s/AsterixConstants/StorageConstants/

Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1367
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <im...@apache.org>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
---
R asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
M asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
M asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
M asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
M asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
5 files changed, 15 insertions(+), 19 deletions(-)

Approvals:
  Ian Maxon: Looks good to me, approved
  Jenkins: Verified; No violations found; Verified



diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/AsterixConstants.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
similarity index 81%
rename from asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/AsterixConstants.java
rename to asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
index 4bca216..382c94b 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/AsterixConstants.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
@@ -19,12 +19,11 @@
 package org.apache.asterix.common.utils;
 
 /**
- * A static class that stores asterix constants
+ * A static class that stores storage constants
  */
-public class AsterixConstants {
-    public static final String ASTERIX_ROOT_METADATA_DIR = "asterix_root_metadata";
+public class StorageConstants {
+    public static final String METADATA_ROOT = "root_metadata";
 
-    private AsterixConstants() {
+    private StorageConstants() {
     }
-
 }
diff --git a/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java b/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
index 9c6725b..71cef80 100644
--- a/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
+++ b/asterixdb/asterix-events/src/main/java/org/apache/asterix/event/util/PatternCreator.java
@@ -27,7 +27,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.utils.AsterixConstants;
+import org.apache.asterix.common.utils.StorageConstants;
 import org.apache.asterix.event.driver.EventDriver;
 import org.apache.asterix.event.error.VerificationUtil;
 import org.apache.asterix.event.model.AsterixInstance;
@@ -43,8 +43,6 @@
 import org.apache.asterix.event.schema.pattern.Value;
 import org.apache.asterix.event.service.AsterixEventService;
 import org.apache.asterix.event.service.AsterixEventServiceUtil;
-import org.apache.asterix.event.service.ILookupService;
-import org.apache.asterix.event.service.ServiceProvider;
 import org.apache.asterix.installer.schema.conf.Backup;
 
 public class PatternCreator {
@@ -145,7 +143,7 @@
             Nodeid nodeid = new Nodeid(new Value(null, node.getId()));
             iodevices = node.getIodevices() == null ? instance.getCluster().getIodevices() : node.getIodevices();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + store + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
+                    + StorageConstants.METADATA_ROOT + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
                     + backupId + " " + hdfsBackupDir + " " + "hdfs" + " " + node.getId() + " " + hdfsUrl + " "
                     + hadoopVersion;
             Event event = new Event("backup", nodeid, pargs);
@@ -170,7 +168,7 @@
             iodevices = node.getIodevices() == null ? instance.getCluster().getIodevices() : node.getIodevices();
             txnLogDir = node.getTxnLogDir() == null ? instance.getCluster().getTxnLogDir() : node.getTxnLogDir();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + store + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + txnLogDir + " " + backupId + " " + backupDir
+                    + StorageConstants.METADATA_ROOT + " " + txnLogDir + " " + backupId + " " + backupDir
                     + " " + "local" + " " + node.getId();
             Event event = new Event("backup", nodeid, pargs);
             patternList.add(new Pattern(null, 1, null, event));
@@ -193,7 +191,7 @@
             Nodeid nodeid = new Nodeid(new Value(null, node.getId()));
             String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + clusterStore + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
+                    + StorageConstants.METADATA_ROOT + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
                     + backupId + " " + " " + hdfsBackupDir + " " + "hdfs" + " " + node.getId() + " " + hdfsUrl + " "
                     + hadoopVersion;
             Event event = new Event("restore", nodeid, pargs);
@@ -214,7 +212,7 @@
             Nodeid nodeid = new Nodeid(new Value(null, node.getId()));
             String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
             pargs = workingDir + " " + instance.getName() + " " + iodevices + " " + clusterStore + " "
-                    + AsterixConstants.ASTERIX_ROOT_METADATA_DIR + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
+                    + StorageConstants.METADATA_ROOT + " " + AsterixEventServiceUtil.TXN_LOG_DIR + " "
                     + backupId + " " + backupDir + " " + "local" + " " + node.getId();
             Event event = new Event("restore", nodeid, pargs);
             patternList.add(new Pattern(null, 1, null, event));
@@ -449,7 +447,7 @@
         for (Node node : cluster.getNode()) {
             String iodevices = node.getIodevices() == null ? cluster.getIodevices() : node.getIodevices();
             String primaryIODevice = iodevices.split(",")[0].trim();
-            pargs = primaryIODevice + File.separator + AsterixConstants.ASTERIX_ROOT_METADATA_DIR;
+            pargs = primaryIODevice + File.separator + StorageConstants.METADATA_ROOT;
             nodeid = new Nodeid(new Value(null, node.getId()));
             event = new Event("file_delete", nodeid, pargs);
             patternList.add(new Pattern(null, 1, null, event));
diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
index 9028e4c..22b6952 100644
--- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
+++ b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java
@@ -36,8 +36,6 @@
 
 public class BackupCommand extends AbstractCommand {
 
-    public static final String ASTERIX_ROOT_METADATA_DIR = "asterix_root_metadata";
-
     @Override
     protected void execCommand() throws Exception {
         InstallerDriver.initConfig(true);
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
index 8600efb..6ccc6d0 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
@@ -45,6 +45,7 @@
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.replication.AsterixReplicationJob;
 import org.apache.asterix.common.replication.IReplicationManager;
+import org.apache.asterix.common.utils.StorageConstants;
 import org.apache.asterix.common.utils.StoragePathUtil;
 import org.apache.commons.io.FileUtils;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -67,8 +68,8 @@
     public static final String METADATA_FILE_NAME = ".metadata";
     // Private constants
     private static final Logger LOGGER = Logger.getLogger(PersistentLocalResourceRepository.class.getName());
-    private static final String STORAGE_METADATA_DIRECTORY = "root_metadata";
-    private static final String STORAGE_METADATA_FILE_NAME_PREFIX = ".root_metadata";
+    private static final String STORAGE_METADATA_DIRECTORY = StorageConstants.METADATA_ROOT;
+    private static final String STORAGE_METADATA_FILE_NAME_PREFIX = "." + StorageConstants.METADATA_ROOT;
     private static final long STORAGE_LOCAL_RESOURCE_ID = -4321;
     private static final int MAX_CACHED_RESOURCES = 1000;
     private static final FilenameFilter METADATA_FILES_FILTER = (File dir, String name) -> name.equalsIgnoreCase(
diff --git a/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java b/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
index 00d9018..56d3d07 100644
--- a/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
+++ b/asterixdb/asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixApplicationMaster.java
@@ -47,7 +47,7 @@
 
 import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.event.schema.cluster.Property;
+import org.apache.asterix.common.utils.StorageConstants;
 import org.apache.asterix.event.schema.yarnCluster.Cluster;
 import org.apache.asterix.event.schema.yarnCluster.MasterNode;
 import org.apache.asterix.event.schema.yarnCluster.Node;
@@ -1288,7 +1288,7 @@
                     FileStatus[] backups = fs.listStatus(new Path(src.toString()));
                     for (FileStatus b : backups) {
                         if (!b.getPath().toString().contains("txnLogs")
-                                && !b.getPath().toString().contains(File.separator + "asterix_root_metadata")) {
+                                && !b.getPath().toString().contains(File.separator + StorageConstants.METADATA_ROOT)) {
                             vargs.add(b.getPath() + "," + s + File.separator + clusterDesc.getStore());
                         }
                     }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: abdullah alamoudi <ba...@gmail.com>

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1711: root metadata
......................................................................


Patch Set 1: Code-Review+2

Seems fine to me, I think we probably should have made a note of when we changed it from 'asterix_root_metadata' to 'root_metadata' though...

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: abdullah alamoudi <ba...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1711: root metadata

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1711: root metadata
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3413/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1367
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7afc3062a4b98883a7a54bd410e8df558e5ebf3c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No