You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/07/06 16:31:44 UTC

[1/2] hbase git commit: HBASE-18255 Set JVM code cache size in provided configuration (Vladimir Rodionov)

Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 b012ca1af -> 3903358ee


HBASE-18255 Set JVM code cache size in provided configuration (Vladimir Rodionov)

Java7 defaults to 50MB (which is likely too small) and 256MB in Java8/9.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/08a76de5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/08a76de5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/08a76de5

Branch: refs/heads/branch-1.4
Commit: 08a76de5ca7c62a82a5974caac363b0ae02f87db
Parents: b012ca1
Author: Josh Elser <el...@apache.org>
Authored: Wed Jul 5 16:53:00 2017 -0400
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Jul 6 09:31:27 2017 -0700

----------------------------------------------------------------------
 conf/hbase-env.cmd | 2 +-
 conf/hbase-env.sh  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/08a76de5/conf/hbase-env.cmd
----------------------------------------------------------------------
diff --git a/conf/hbase-env.cmd b/conf/hbase-env.cmd
index 9fb87d7..2ffadbf 100644
--- a/conf/hbase-env.cmd
+++ b/conf/hbase-env.cmd
@@ -44,7 +44,7 @@ set HBASE_OPTS="-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true"
 
 @rem Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
 set HBASE_MASTER_OPTS=%HBASE_MASTER_OPTS% "-XX:PermSize=128m" "-XX:MaxPermSize=128m"
-set HBASE_REGIONSERVER_OPTS=%HBASE_REGIONSERVER_OPTS% "-XX:PermSize=128m" "-XX:MaxPermSize=128m"
+set HBASE_REGIONSERVER_OPTS=%HBASE_REGIONSERVER_OPTS% "-XX:PermSize=128m" "-XX:MaxPermSize=128m" "-XX:ReservedCodeCacheSize=256m"
 
 @rem Uncomment below to enable java garbage collection logging for the server-side processes
 @rem this enables basic gc logging for the server processes to the .out file

http://git-wip-us.apache.org/repos/asf/hbase/blob/08a76de5/conf/hbase-env.sh
----------------------------------------------------------------------
diff --git a/conf/hbase-env.sh b/conf/hbase-env.sh
index b7d00d1..599a2f1 100644
--- a/conf/hbase-env.sh
+++ b/conf/hbase-env.sh
@@ -44,7 +44,7 @@ export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
 
 # Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
 export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
-export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
+export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
 
 # Uncomment one of the below three options to enable java garbage collection logging for the server-side processes.
 


[2/2] hbase git commit: HBASE-18312 Ineffective handling of FileNotFoundException in FileLink.tryOpen()

Posted by ap...@apache.org.
HBASE-18312 Ineffective handling of FileNotFoundException in FileLink.tryOpen()


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3903358e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3903358e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3903358e

Branch: refs/heads/branch-1.4
Commit: 3903358eedcd6cd640b38147251cccc3728358b7
Parents: 08a76de
Author: tedyu <yu...@gmail.com>
Authored: Wed Jul 5 21:02:28 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Jul 6 09:31:28 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/io/FileLink.java    |  4 +++
 .../apache/hadoop/hbase/io/TestFileLink.java    | 31 ++++++++++++++++++++
 2 files changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3903358e/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java
index 3caf67f..beeb8af 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java
@@ -36,6 +36,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.PositionedReadable;
 import org.apache.hadoop.fs.Seekable;
 import org.apache.hadoop.hbase.util.FSUtils;
+import org.apache.hadoop.ipc.RemoteException;
 
 /**
  * The FileLink is a sort of hardlink, that allows access to a file given a set of locations.
@@ -302,6 +303,9 @@ public class FileLink {
           return(in);
         } catch (FileNotFoundException e) {
           // Try another file location
+        } catch (RemoteException re) {
+          IOException ioe = re.unwrapRemoteException(FileNotFoundException.class);
+          if (!(ioe instanceof FileNotFoundException)) throw re;
         }
       }
       throw new FileNotFoundException("Unable to open link: " + fileLink);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3903358e/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
index da2c7a0..2f1d4ab 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
@@ -36,7 +36,9 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.util.FSUtils;
+import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.hadoop.ipc.RemoteException;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -104,6 +106,35 @@ public class TestFileLink {
     }
   }
 
+  private static class MyDistributedFileSystem extends DistributedFileSystem {
+    MyDistributedFileSystem() {
+    }
+    @Override
+    public FSDataInputStream open(Path f, final int bufferSize)
+        throws IOException {
+      throw new RemoteException(FileNotFoundException.class.getName(), "");
+    }
+    @Override
+    public Configuration getConf() {
+      return new Configuration();
+    }
+  }
+  @Test(expected = FileNotFoundException.class)
+  public void testLinkReadWithMissingFile() throws Exception {
+    HBaseTestingUtility testUtil = new HBaseTestingUtility();
+    FileSystem fs = new MyDistributedFileSystem();
+
+    Path originalPath = new Path(testUtil.getDefaultRootDirPath(), "test.file");
+    Path archivedPath = new Path(testUtil.getDefaultRootDirPath(), "archived.file");
+
+    List<Path> files = new ArrayList<Path>();
+    files.add(originalPath);
+    files.add(archivedPath);
+
+    FileLink link = new FileLink(files);
+    link.open(fs);
+  }
+
   /**
    * Test, on a local filesystem, that the FileLink is still readable
    * even when the current file gets renamed.