hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject svn commit: r1518411 - in /hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions: AddColumnAction.java ChangeEncodingAction.java ChangeVersionsAction.java RemoveColumnAction.java
Date Wed, 28 Aug 2013 22:58:57 GMT
Author: eclark
Date: Wed Aug 28 22:58:57 2013
New Revision: 1518411

URL: http://svn.apache.org/r1518411
Log:
HBASE-9370 Add logging to Schema change Chaos actions.

Modified:
    hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
    hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java
    hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeVersionsAction.java
    hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RemoveColumnAction.java

Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java?rev=1518411&r1=1518410&r2=1518411&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
(original)
+++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java
Wed Aug 28 22:58:57 2013
@@ -32,9 +32,11 @@ import org.apache.hadoop.hbase.util.Byte
  */
 public class AddColumnAction extends Action {
   private final byte[] tableName;
+  private final String tableNameString;
   private HBaseAdmin admin;
 
   public AddColumnAction(String tableName) {
+    tableNameString = tableName;
     this.tableName = Bytes.toBytes(tableName);
   }
 
@@ -54,6 +56,8 @@ public class AddColumnAction extends Act
       columnDescriptor = new HColumnDescriptor(RandomStringUtils.randomAlphabetic(5));
     }
 
+    LOG.debug("Performing action: Adding " + columnDescriptor + " to " + tableNameString);
+
     tableDescriptor.addFamily(columnDescriptor);
     admin.modifyTable(tableName, tableDescriptor);
   }

Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java?rev=1518411&r1=1518410&r2=1518411&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java
(original)
+++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeEncodingAction.java
Wed Aug 28 22:58:57 2013
@@ -32,11 +32,13 @@ import org.apache.hadoop.hbase.util.Byte
  */
 public class ChangeEncodingAction extends Action {
   private final byte[] tableName;
+  private final String tableNameString;
 
   private HBaseAdmin admin;
   private Random random;
 
   public ChangeEncodingAction(String tableName) {
+    tableNameString = tableName;
     this.tableName = Bytes.toBytes(tableName);
     this.random = new Random();
   }
@@ -56,6 +58,7 @@ public class ChangeEncodingAction extend
       return;
     }
 
+    LOG.debug("Performing action: Changing encodings on " + tableNameString);
     // possible DataBlockEncoding id's
     int[] possibleIds = {0, 2, 3, 4, 6};
     for (HColumnDescriptor descriptor : columnDescriptors) {

Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeVersionsAction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeVersionsAction.java?rev=1518411&r1=1518410&r2=1518411&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeVersionsAction.java
(original)
+++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeVersionsAction.java
Wed Aug 28 22:58:57 2013
@@ -33,11 +33,13 @@ import org.apache.hadoop.hbase.util.Byte
  */
 public class ChangeVersionsAction extends Action {
   private final byte[] tableName;
+  private final String tableNameString;
 
   private HBaseAdmin admin;
   private Random random;
 
   public ChangeVersionsAction(String tableName) {
+    tableNameString = tableName;
     this.tableName = Bytes.toBytes(tableName);
     this.random = new Random();
   }
@@ -62,7 +64,7 @@ public class ChangeVersionsAction extend
       descriptor.setMaxVersions(versions);
       descriptor.setMinVersions(versions);
     }
-
+    LOG.debug("Performing action: Changing versions on " + tableNameString);
     admin.modifyTable(tableName, tableDescriptor);
   }
 }

Modified: hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RemoveColumnAction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RemoveColumnAction.java?rev=1518411&r1=1518410&r2=1518411&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RemoveColumnAction.java
(original)
+++ hbase/branches/0.95/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RemoveColumnAction.java
Wed Aug 28 22:58:57 2013
@@ -33,10 +33,12 @@ import org.apache.hadoop.hbase.util.Byte
 public class RemoveColumnAction extends Action {
   private final byte[] tableName;
   private final Set<String> protectedColumns;
+  private final String tableNameString;
   private HBaseAdmin admin;
   private Random random;
 
   public RemoveColumnAction(String tableName, Set<String> protectedColumns) {
+    tableNameString = tableName;
     this.tableName = Bytes.toBytes(tableName);
     this.protectedColumns = protectedColumns;
     random = new Random();
@@ -62,7 +64,8 @@ public class RemoveColumnAction extends 
           protectedColumns.contains(columnDescriptors[index].getNameAsString())) {
       index = random.nextInt(columnDescriptors.length);
     }
-
+    LOG.debug("Performing action: Removing " + columnDescriptors[index].getName() + " from
"
+        + tableNameString);
     tableDescriptor.removeFamily(columnDescriptors[index].getName());
 
     admin.modifyTable(tableName, tableDescriptor);



Mime
View raw message