You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2013/09/09 20:28:25 UTC
svn commit: r1521229 - in /hbase/branches/0.96:
hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
hbase-common/src/main/resources/hbase-default.xml
hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
Author: larsh
Date: Mon Sep 9 18:28:25 2013
New Revision: 1521229
URL: http://svn.apache.org/r1521229
Log:
HBASE-9301 Default hbase.dynamic.jars.dir to hbase.rootdir/jars (Vasu Mariyala)
Modified:
hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml
hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
Modified: hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1521229&r1=1521228&r2=1521229&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java Mon Sep 9 18:28:25 2013
@@ -292,6 +292,13 @@ public final class HConstants {
/** Any artifacts left from migration can be moved here */
public static final String MIGRATION_NAME = ".migration";
+ /**
+ * The directory from which co-processor/custom filter jars can be loaded
+ * dynamically by the region servers. This value can be overridden by the
+ * hbase.dynamic.jars.dir config.
+ */
+ public static final String LIB_DIR = "lib";
+
/** Used to construct the name of the compaction directory during compaction */
public static final String HREGION_COMPACTIONDIR_NAME = "compaction.dir";
@@ -829,7 +836,7 @@ public final class HConstants {
Collections.unmodifiableList(Arrays.asList(new String[] { HREGION_LOGDIR_NAME,
HREGION_OLDLOGDIR_NAME, CORRUPT_DIR_NAME, SPLIT_LOGDIR_NAME,
HBCK_SIDELINEDIR_NAME, HFILE_ARCHIVE_DIRECTORY, SNAPSHOT_DIR_NAME, HBASE_TEMP_DIRECTORY,
- OLD_SNAPSHOT_DIR_NAME, BASE_NAMESPACE_DIR, MIGRATION_NAME}));
+ OLD_SNAPSHOT_DIR_NAME, BASE_NAMESPACE_DIR, MIGRATION_NAME, LIB_DIR}));
/** Directories that are not HBase user table directories */
public static final List<String> HBASE_NON_USER_TABLE_DIRS =
Modified: hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml?rev=1521229&r1=1521228&r2=1521229&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml (original)
+++ hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml Mon Sep 9 18:28:25 2013
@@ -1017,4 +1017,14 @@ possible configurations would overwhelm
</description>
</property>
+ <property>
+ <name>hbase.dynamic.jars.dir</name>
+ <value>${hbase.rootdir}/lib</value>
+ <description>
+ The directory from which the custom filter/co-processor jars can be loaded
+ dynamically by the region server without the need to restart. However,
+ an already loaded filter/co-processor class would not be un-loaded. See
+ HBASE-1936 for more details.
+ </description>
+ </property>
</configuration>
Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java?rev=1521229&r1=1521228&r2=1521229&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java Mon Sep 9 18:28:25 2013
@@ -85,6 +85,10 @@ public class NamespaceUpgrade implements
private static final String DOT_CORRUPT = ".corrupt";
private static final String DOT_SPLITLOG = "splitlog";
private static final String DOT_ARCHIVE = ".archive";
+
+ // The old default directory of hbase.dynamic.jars.dir(0.94.12 release).
+ private static final String DOT_LIB_DIR = ".lib";
+
private static final String OLD_ACL = "_acl_";
/** Directories that are not HBase table directories */
static final List<String> NON_USER_TABLE_DIRS = Arrays.asList(new String[] {
@@ -97,7 +101,8 @@ public class NamespaceUpgrade implements
HConstants.SNAPSHOT_DIR_NAME,
HConstants.HBASE_TEMP_DIRECTORY,
TMP_DATA_DIR,
- OLD_ACL});
+ OLD_ACL,
+ DOT_LIB_DIR});
public NamespaceUpgrade() throws IOException {
super();
@@ -165,7 +170,9 @@ public class NamespaceUpgrade implements
new Path [] {new Path(rootDir, DOT_OLD_LOGS),
new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME)},
new Path [] {new Path(rootDir, TMP_DATA_DIR),
- new Path(rootDir, HConstants.BASE_NAMESPACE_DIR)}};
+ new Path(rootDir, HConstants.BASE_NAMESPACE_DIR)},
+ new Path[] { new Path(rootDir, DOT_LIB_DIR),
+ new Path(rootDir, HConstants.LIB_DIR)}};
for (Path [] dir: dirs) {
Path src = dir[0];
Path tgt = dir[1];