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 2019/10/31 17:38:19 UTC

[hbase] branch branch-2.2 updated (6a81735 -> f11bd06)

This is an automated email from the ASF dual-hosted git repository.

stack pushed a change to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git.


    from 6a81735  Revert "HBASE-23199 Error populating Table-Attribute fields (#741)"
     new cfd3da1  Revert "Revert "HBASE-23199 Error populating Table-Attribute fields (#741)"" Reapply. Mistakenly reverted.
     new f11bd06  Revert "HBASE-22917 Proc-WAL roll fails saying someone else has already created log (#544)"

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../procedure2/store/wal/WALProcedureStore.java    | 36 +++-------------------
 .../main/resources/hbase-webapps/master/table.jsp  |  7 ++---
 2 files changed, 8 insertions(+), 35 deletions(-)


[hbase] 01/02: Revert "Revert "HBASE-23199 Error populating Table-Attribute fields (#741)"" Reapply. Mistakenly reverted.

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit cfd3da1186a8f88cbac43c72229f4961a4625bc3
Author: stack <st...@apache.org>
AuthorDate: Thu Oct 31 10:37:43 2019 -0700

    Revert "Revert "HBASE-23199 Error populating Table-Attribute fields (#741)""
    Reapply. Mistakenly reverted.
    
    This reverts commit 6a8173561be136ce87a87ae6a765d39726345901.
---
 hbase-server/src/main/resources/hbase-webapps/master/table.jsp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index 568a6e6..5f808c8 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -356,8 +356,7 @@ if (fqtn != null && master.isInitialized()) {
   </tr>
 <%
     }
-
-  if (quota.hasThrottle()) {
+  if (quota != null && quota.hasThrottle()) {
     List<ThrottleSettings> throttles = QuotaSettingsFactory.fromTableThrottles(table.getName(), quota.getThrottle());
     if (throttles.size() > 0) {
 %>
@@ -389,8 +388,8 @@ if (fqtn != null && master.isInitialized()) {
   </tr>
 <%
     }
-  }
-  }
+   }
+ }
 %>
 </table>
 <h2>Table Schema</h2>


[hbase] 02/02: Revert "HBASE-22917 Proc-WAL roll fails saying someone else has already created log (#544)"

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit f11bd069fb670a2785fdee737f1f05eba75d4504
Author: stack <st...@apache.org>
AuthorDate: Thu Oct 31 10:38:02 2019 -0700

    Revert "HBASE-22917 Proc-WAL roll fails saying someone else has already created log (#544)"
    
    This reverts commit e005b49118f5cd78b7229f283507b16400e6c8ac.
---
 .../procedure2/store/wal/WALProcedureStore.java    | 36 +++-------------------
 1 file changed, 5 insertions(+), 31 deletions(-)

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 7e5a038..ae1088a 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
@@ -421,10 +421,9 @@ public class WALProcedureStore extends ProcedureStoreBase {
         }
 
         // Create new state-log
-        long newFlushLogId = flushLogId + 1;
-        if (!rollWriter(newFlushLogId)) {
+        if (!rollWriter(flushLogId + 1)) {
           // someone else has already created this log
-          LOG.debug("Someone else has already created log {}. Retrying.", newFlushLogId);
+          LOG.debug("Someone else has already created log {}. Retrying.", flushLogId);
           continue;
         }
 
@@ -1043,9 +1042,8 @@ public class WALProcedureStore extends ProcedureStoreBase {
     }
 
     // Create new state-log
-    long newFlushLogId = flushLogId + 1;
-    if (!rollWriter(newFlushLogId)) {
-      LOG.warn("someone else has already created log {}", newFlushLogId);
+    if (!rollWriter(flushLogId + 1)) {
+      LOG.warn("someone else has already created log {}", flushLogId);
       return false;
     }
 
@@ -1102,8 +1100,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
       startPos = newStream.getPos();
     } catch (IOException ioe) {
       LOG.warn("Encountered exception writing header", ioe);
-      // Close and delete the incomplete file
-      closeAndDeleteIncompleteFile(newStream, newLogFile);
+      newStream.close();
       return false;
     }
 
@@ -1168,29 +1165,6 @@ public class WALProcedureStore extends ProcedureStoreBase {
     stream = null;
   }
 
-  private void closeAndDeleteIncompleteFile(FSDataOutputStream newStream, Path newLogFile) {
-    // Close the FS
-    try {
-      newStream.close();
-    } catch (IOException e) {
-      LOG.error("Exception occured while closing the file {}", newLogFile, e);
-    }
-
-    // Delete the incomplete file
-    try {
-      if (!fs.delete(newLogFile, false)) {
-        LOG.warn(
-          "Failed to delete the log file {}, increasing the log id by 1 for the next roll attempt",
-          newLogFile);
-        flushLogId++;
-      }
-    } catch (IOException e) {
-      LOG.warn("Exception occured while deleting the file {}", newLogFile, e);
-      flushLogId++;
-      LOG.info("Increased the log id to {}", flushLogId);
-    }
-  }
-
   // ==========================================================================
   //  Log Files cleaner helpers
   // ==========================================================================