You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/05/12 23:26:00 UTC
hbase git commit: archive is for hfiles only and the cleaner is
removing my pv2 files
Repository: hbase
Updated Branches:
refs/heads/HBASE-14614 f209990b5 -> 4ab52f2c1
archive is for hfiles only and the cleaner is removing my pv2 files
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4ab52f2c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4ab52f2c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4ab52f2c
Branch: refs/heads/HBASE-14614
Commit: 4ab52f2c199850e65f5eefe6ffe7be559f090671
Parents: f209990
Author: Michael Stack <st...@apache.org>
Authored: Fri May 12 16:25:55 2017 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Fri May 12 16:25:55 2017 -0700
----------------------------------------------------------------------
.../hadoop/hbase/procedure2/store/wal/WALProcedureStore.java | 7 ++++---
.../src/main/java/org/apache/hadoop/hbase/master/HMaster.java | 5 ++---
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/4ab52f2c/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
index b64fd54..1791cae 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/WALProcedureStore.java
@@ -66,6 +66,7 @@ import com.google.common.annotations.VisibleForTesting;
@InterfaceStability.Evolving
public class WALProcedureStore extends ProcedureStoreBase {
private static final Log LOG = LogFactory.getLog(WALProcedureStore.class);
+ public static final String LOG_PREFIX = "pv2-";
public interface LeaseRecovery {
void recoverFileLease(FileSystem fs, Path path) throws IOException;
@@ -1145,7 +1146,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
}
protected Path getLogFilePath(final long logId) throws IOException {
- return new Path(walDir, String.format("state-%020d.log", logId));
+ return new Path(walDir, String.format(LOG_PREFIX + "%020d.log", logId));
}
private static long getLogIdFromName(final String name) {
@@ -1158,7 +1159,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
@Override
public boolean accept(Path path) {
String name = path.getName();
- return name.startsWith("state-") && name.endsWith(".log");
+ return name.startsWith(LOG_PREFIX) && name.endsWith(".log");
}
};
@@ -1248,7 +1249,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
return null;
}
if (LOG.isDebugEnabled()) {
- LOG.debug("Opening state-log: " + logFile);
+ LOG.debug("Opening Pv2 " + logFile);
}
try {
log.open();
http://git-wip-us.apache.org/repos/asf/hbase/blob/4ab52f2c/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 142547d..9b02873 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -1111,9 +1111,8 @@ public class HMaster extends HRegionServer implements MasterServices {
final MasterProcedureEnv procEnv = new MasterProcedureEnv(this);
final Path walDir = new Path(FSUtils.getWALRootDir(this.conf),
MasterProcedureConstants.MASTER_PROCEDURE_LOGDIR);
- final Path walArchiveDir = new Path(HFileArchiveUtil.getArchivePath(this.conf),
- MasterProcedureConstants.MASTER_PROCEDURE_LOGDIR);
-
+ // TODO: No cleaner currently!
+ final Path walArchiveDir = new Path(walDir, HConstants.HFILE_ARCHIVE_DIRECTORY);
procedureStore = new WALProcedureStore(conf, walDir.getFileSystem(conf), walDir, walArchiveDir,
new MasterProcedureEnv.WALStoreLeaseRecovery(this));
procedureStore.registerListener(new MasterProcedureEnv.MasterProcedureStoreListener(this));