hbase git commit: Add an exists
Repository: hbase Updated Branches: refs/heads/HBASE-14614 61c904732 -> 7e4e547e2 Add an exists Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7e4e547e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7e4e547e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7e4e547e Branch: refs/heads/HBASE-14614 Commit: 7e4e547e2069a41a02563b9cc56455461f478584 Parents: 61c9047 Author: Michael Stack Authored: Fri May 12 15:43:23 2017 -0700 Committer: Michael Stack Committed: Fri May 12 15:43:23 2017 -0700 -- .../hbase/procedure2/store/wal/ProcedureWALFile.java| 2 +- .../hbase/procedure2/store/wal/WALProcedureStore.java | 12 +++- .../java/org/apache/hadoop/hbase/master/HMaster.java| 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/7e4e547e/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java index 42abe8f..95a1ef6 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java @@ -160,7 +160,7 @@ public class ProcedureWALFile implements Comparable { boolean archived = false; if (walArchiveDir != null) { Path archivedFile = new Path(walArchiveDir, logFile.getName()); - LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to " + walArchiveDir); + LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to " + archivedFile); if (!fs.rename(logFile, archivedFile)) { LOG.warn("Failed archive of " + logFile + ", deleting"); } else { http://git-wip-us.apache.org/repos/asf/hbase/blob/7e4e547e/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 df818fe..b64fd54 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 @@ -246,6 +246,16 @@ public class WALProcedureStore extends ProcedureStoreBase { } }; syncThread.start(); + +// Create archive dir up front. Rename won't work w/o it up on HDFS. +if (this.walArchiveDir != null && !this.fs.exists(this.walArchiveDir)) { + if (this.fs.mkdirs(this.walArchiveDir)) { +if (LOG.isDebugEnabled()) LOG.debug("Created Procedure Store WAL archive dir " + +this.walArchiveDir); + } else { +LOG.warn("Failed create of " + this.walArchiveDir); + } +} } @Override @@ -1113,7 +1123,7 @@ public class WALProcedureStore extends ProcedureStoreBase { log.removeFile(walArchiveDir); logs.remove(log); if (LOG.isDebugEnabled()) { -LOG.info("Removed log=" + log + " activeLogs=" + logs); +LOG.info("Removed log=" + log + ", activeLogs=" + logs); } assert logs.size() > 0 : "expected at least one log"; } catch (IOException e) { http://git-wip-us.apache.org/repos/asf/hbase/blob/7e4e547e/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 5c6fdda..984afb8 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 @@ -,10 +,10 @@ 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 archiveWalDir = new Path(new Path(FSUtils.getWALRootDir(this.conf), +final Path walArchiveDir = new Path(new Path(FSUtils.getWALRootDir(this.conf), HConstants.HFILE_ARCHIVE_DIRECTORY), MasterProcedureConstants.MASTER_PROCEDURE_LOGDIR); -
[32/50] [abbrv] hbase git commit: Add an exists
Add an exists Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d523dec7 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d523dec7 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d523dec7 Branch: refs/heads/HBASE-14614 Commit: d523dec794085656ff2fdc33a25c031386e7407b Parents: 53b865a Author: Michael Stack Authored: Fri May 12 15:43:23 2017 -0700 Committer: Michael Stack Committed: Tue May 23 08:36:53 2017 -0700 -- .../hbase/procedure2/store/wal/ProcedureWALFile.java| 2 +- .../hbase/procedure2/store/wal/WALProcedureStore.java | 12 +++- .../java/org/apache/hadoop/hbase/master/HMaster.java| 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d523dec7/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java index 42abe8f..95a1ef6 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java @@ -160,7 +160,7 @@ public class ProcedureWALFile implements Comparable { boolean archived = false; if (walArchiveDir != null) { Path archivedFile = new Path(walArchiveDir, logFile.getName()); - LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to " + walArchiveDir); + LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to " + archivedFile); if (!fs.rename(logFile, archivedFile)) { LOG.warn("Failed archive of " + logFile + ", deleting"); } else { http://git-wip-us.apache.org/repos/asf/hbase/blob/d523dec7/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 df818fe..b64fd54 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 @@ -246,6 +246,16 @@ public class WALProcedureStore extends ProcedureStoreBase { } }; syncThread.start(); + +// Create archive dir up front. Rename won't work w/o it up on HDFS. +if (this.walArchiveDir != null && !this.fs.exists(this.walArchiveDir)) { + if (this.fs.mkdirs(this.walArchiveDir)) { +if (LOG.isDebugEnabled()) LOG.debug("Created Procedure Store WAL archive dir " + +this.walArchiveDir); + } else { +LOG.warn("Failed create of " + this.walArchiveDir); + } +} } @Override @@ -1113,7 +1123,7 @@ public class WALProcedureStore extends ProcedureStoreBase { log.removeFile(walArchiveDir); logs.remove(log); if (LOG.isDebugEnabled()) { -LOG.info("Removed log=" + log + " activeLogs=" + logs); +LOG.info("Removed log=" + log + ", activeLogs=" + logs); } assert logs.size() > 0 : "expected at least one log"; } catch (IOException e) { http://git-wip-us.apache.org/repos/asf/hbase/blob/d523dec7/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 a07c436..d1fe35e 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 @@ -1163,7 +1163,7 @@ 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 archiveWalDir = new Path(new Path(FSUtils.getWALRootDir(this.conf), +final Path walArchiveDir = new Path(new Path(FSUtils.getWALRootDir(this.conf), HConstants.HFILE_ARCHIVE_DIRECTORY), MasterProcedureConstants.MASTER_PROCEDURE_LOGDIR); final FileSystem walFs = walDir.getFileSystem(conf); @@ -1178,7 +1178,7 @@ public cla
[32/50] [abbrv] hbase git commit: Add an exists
Add an exists Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c4433084 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c4433084 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c4433084 Branch: refs/heads/HBASE-14614 Commit: c443308486d624a3f7ac086cf6ad1a30f6a94064 Parents: a8dfa37 Author: Michael Stack Authored: Fri May 12 15:43:23 2017 -0700 Committer: Michael Stack Committed: Tue May 23 00:33:03 2017 -0700 -- .../hbase/procedure2/store/wal/ProcedureWALFile.java| 2 +- .../hbase/procedure2/store/wal/WALProcedureStore.java | 12 +++- .../java/org/apache/hadoop/hbase/master/HMaster.java| 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c4433084/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java -- diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java index 42abe8f..95a1ef6 100644 --- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java +++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java @@ -160,7 +160,7 @@ public class ProcedureWALFile implements Comparable { boolean archived = false; if (walArchiveDir != null) { Path archivedFile = new Path(walArchiveDir, logFile.getName()); - LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to " + walArchiveDir); + LOG.info("ARCHIVED (TODO: FILES ARE NOT PURGED FROM ARCHIVE!) " + logFile + " to " + archivedFile); if (!fs.rename(logFile, archivedFile)) { LOG.warn("Failed archive of " + logFile + ", deleting"); } else { http://git-wip-us.apache.org/repos/asf/hbase/blob/c4433084/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 df818fe..b64fd54 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 @@ -246,6 +246,16 @@ public class WALProcedureStore extends ProcedureStoreBase { } }; syncThread.start(); + +// Create archive dir up front. Rename won't work w/o it up on HDFS. +if (this.walArchiveDir != null && !this.fs.exists(this.walArchiveDir)) { + if (this.fs.mkdirs(this.walArchiveDir)) { +if (LOG.isDebugEnabled()) LOG.debug("Created Procedure Store WAL archive dir " + +this.walArchiveDir); + } else { +LOG.warn("Failed create of " + this.walArchiveDir); + } +} } @Override @@ -1113,7 +1123,7 @@ public class WALProcedureStore extends ProcedureStoreBase { log.removeFile(walArchiveDir); logs.remove(log); if (LOG.isDebugEnabled()) { -LOG.info("Removed log=" + log + " activeLogs=" + logs); +LOG.info("Removed log=" + log + ", activeLogs=" + logs); } assert logs.size() > 0 : "expected at least one log"; } catch (IOException e) { http://git-wip-us.apache.org/repos/asf/hbase/blob/c4433084/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 6796d59..39e1e6e 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 @@ -1163,7 +1163,7 @@ 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 archiveWalDir = new Path(new Path(FSUtils.getWALRootDir(this.conf), +final Path walArchiveDir = new Path(new Path(FSUtils.getWALRootDir(this.conf), HConstants.HFILE_ARCHIVE_DIRECTORY), MasterProcedureConstants.MASTER_PROCEDURE_LOGDIR); final FileSystem walFs = walDir.getFileSystem(conf); @@ -1178,7 +1178,7 @@ public cla