Index: hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java (revision 1521980) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java (working copy) @@ -53,6 +53,7 @@ import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; @@ -1153,6 +1154,8 @@ } } HTableDescriptor htd = new HTableDescriptor(fullTName); + byte[] family = Bytes.toBytes(fname); + htd.addFamily(new HColumnDescriptor(family)); byte[] value = new byte[edit_size]; List hris = new ArrayList(); @@ -1180,7 +1183,6 @@ row = Arrays.copyOfRange(row, 3, 8); // use last 5 bytes because // HBaseTestingUtility.createMultiRegions use 5 bytes // key - byte[] family = Bytes.toBytes(fname); byte[] qualifier = Bytes.toBytes("c" + Integer.toString(i)); e.add(new KeyValue(row, family, qualifier, System.currentTimeMillis(), value)); log.append(curRegionInfo, fullTName, e, System.currentTimeMillis(), htd); Index: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (revision 1521980) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (working copy) @@ -2210,7 +2210,7 @@ HRegionServer server, FileSystem fs, Path logDir, Path oldLogDir) throws IOException{ // If replication is not enabled, then return immediately. - if (!conf.getBoolean(HConstants.REPLICATION_ENABLE_KEY, false)) { + if (!conf.getBoolean(HConstants.REPLICATION_ENABLE_KEY, true)) { return; } Index: hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java (revision 1521980) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java (working copy) @@ -173,7 +173,7 @@ if (!doCommandLine(args)) { return null; } - if (!conf.getBoolean(HConstants.REPLICATION_ENABLE_KEY, false)) { + if (!conf.getBoolean(HConstants.REPLICATION_ENABLE_KEY, true)) { throw new IOException("Replication needs to be enabled to verify it."); } conf.set(NAME+".peerId", peerId); Index: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java (revision 1521980) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/Replication.java (working copy) @@ -148,7 +148,7 @@ * @return True if replication is enabled. */ public static boolean isReplication(final Configuration c) { - return c.getBoolean(REPLICATION_ENABLE_KEY, false); + return c.getBoolean(REPLICATION_ENABLE_KEY, true); } /* @@ -244,7 +244,8 @@ byte[] family; for (KeyValue kv : logEdit.getKeyValues()) { family = kv.getFamily(); - if (kv.matchingFamily(WALEdit.METAFAMILY)) continue; + // unit tests have a tendency to pass incorrect htds, prevent NPEs by checking if null + if (kv.matchingFamily(WALEdit.METAFAMILY) || htd.getFamily(family) == null) continue; int scope = htd.getFamily(family).getScope(); if (scope != REPLICATION_SCOPE_LOCAL && Index: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java (revision 1521980) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java (working copy) @@ -109,7 +109,7 @@ @Override public void setConf(Configuration config) { // If replication is disabled, keep all members null - if (!config.getBoolean(HConstants.REPLICATION_ENABLE_KEY, false)) { + if (!config.getBoolean(HConstants.REPLICATION_ENABLE_KEY, true)) { LOG.warn("Not configured - allowing all hlogs to be deleted"); return; } Index: hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java (revision 1521980) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java (working copy) @@ -88,7 +88,7 @@ * @throws RuntimeException if replication isn't enabled. */ public ReplicationAdmin(Configuration conf) throws IOException { - if (!conf.getBoolean(HConstants.REPLICATION_ENABLE_KEY, false)) { + if (!conf.getBoolean(HConstants.REPLICATION_ENABLE_KEY, true)) { throw new RuntimeException("hbase.replication isn't true, please " + "enable it in order to use replication"); }