You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2016/12/10 00:35:47 UTC

[1/2] kudu git commit: KUDU-1799: AsyncKuduClient.discoverTablets has very expensive logging

Repository: kudu
Updated Branches:
  refs/heads/branch-1.2.x b0a023345 -> eaed73bde


KUDU-1799: AsyncKuduClient.discoverTablets has very expensive logging

Change-Id: I2d787c811efa097ed0fe4f6ca17ccd1ddace6409
Reviewed-on: http://gerrit.cloudera.org:8080/5443
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Tested-by: Kudu Jenkins
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
(cherry picked from commit 2161005fbc47845ee8e4d211a514318b8b194b24)
Reviewed-on: http://gerrit.cloudera.org:8080/5451


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/0f2e07e7
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/0f2e07e7
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/0f2e07e7

Branch: refs/heads/branch-1.2.x
Commit: 0f2e07e70ad79e1a13bab17b5d20175347d7aacf
Parents: b0a0233
Author: Dan Burkert <da...@apache.org>
Authored: Fri Dec 9 12:56:29 2016 -0800
Committer: Dan Burkert <da...@apache.org>
Committed: Sat Dec 10 00:35:29 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/kudu/client/AsyncKuduClient.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/0f2e07e7/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
index 5d7f912..78c190b 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
@@ -1364,8 +1364,8 @@ public class AsyncKuduClient implements AutoCloseable {
 
       RemoteTablet rt = new RemoteTablet(tableId, tabletPb, servers);
 
-      LOG.info("Learned about tablet {} for table '{}' with partition {}",
-               rt.getTabletId(), tableName, rt.getPartition());
+      LOG.debug("Learned about tablet {} for table '{}' with partition {}",
+                rt.getTabletId(), tableName, rt.getPartition());
       tablets.add(rt);
     }
 


[2/2] kudu git commit: KUDU-1798: [env] File manager broken on OS X 10.11

Posted by da...@apache.org.
KUDU-1798: [env] File manager broken on OS X 10.11

Env::IncreaseOpenFileLimit() relies upon few system calls which behave
differently on OS X 10.11 than on Linux or other versions of macOS. See
the new comment in env_posix.cc for details.

Change-Id: Idb18b4e52ad80f89f61a92898c50c479643c12ec
Reviewed-on: http://gerrit.cloudera.org:8080/5438
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Kudu Jenkins
(cherry picked from commit 8e1a8c550408bbd9c580d2dfe6fb22ce8e8c958c)
Reviewed-on: http://gerrit.cloudera.org:8080/5452
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>


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

Branch: refs/heads/branch-1.2.x
Commit: eaed73bde9eed2170df1447fbeb754b36eb0a996
Parents: 0f2e07e
Author: Dinesh Bhat <di...@cloudera.com>
Authored: Fri Dec 9 14:05:25 2016 +0530
Committer: Dan Burkert <da...@apache.org>
Committed: Sat Dec 10 00:35:35 2016 +0000

----------------------------------------------------------------------
 src/kudu/util/env-test.cc  |  8 ++++++++
 src/kudu/util/env_posix.cc | 16 ++++++++++++++++
 2 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/eaed73bd/src/kudu/util/env-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env-test.cc b/src/kudu/util/env-test.cc
index f3c41d3..a90f0e1 100644
--- a/src/kudu/util/env-test.cc
+++ b/src/kudu/util/env-test.cc
@@ -552,6 +552,14 @@ TEST_F(TestEnv, TestIsDirectory) {
   ASSERT_FALSE(is_dir);
 }
 
+// Regression test for KUDU-1776.
+TEST_F(TestEnv, TestIncreaseOpenFileLimit) {
+  int64_t limit_before = env_->GetOpenFileLimit();
+  env_->IncreaseOpenFileLimit();
+  int64_t limit_after = env_->GetOpenFileLimit();
+  ASSERT_GE(limit_after, limit_before) << "Failed to retain/increase open file limit";
+}
+
 static Status TestWalkCb(vector<string>* actual,
                          Env::FileType type,
                          const string& dirname, const string& basename) {

http://git-wip-us.apache.org/repos/asf/kudu/blob/eaed73bd/src/kudu/util/env_posix.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/env_posix.cc b/src/kudu/util/env_posix.cc
index 3f0be74..984e032 100644
--- a/src/kudu/util/env_posix.cc
+++ b/src/kudu/util/env_posix.cc
@@ -1259,6 +1259,22 @@ class PosixEnv : public Env {
     // This change is logged because it is process-wide.
     struct rlimit l;
     PCHECK(getrlimit(RLIMIT_NOFILE, &l) == 0);
+#if defined(__APPLE__)
+    // OS X 10.11 can return RLIM_INFINITY from getrlimit, but allows rlim_cur and
+    // rlim_max to be raised only as high as the value of the maxfilesperproc
+    // kernel variable. Emperically, this value is 10240 across all tested macOS
+    // versions. Testing on OS X 10.10 and macOS 10.12 revealed that getrlimit
+    // returns the true limits (not RLIM_INFINITY), rlim_max can *not* be raised
+    // (when running as non-root), and rlim_cur can only be raised as high as
+    // rlim_max (this is consistent with Linux).
+    // TLDR; OS X 10.11 is wack.
+    if (l.rlim_max == RLIM_INFINITY) {
+      uint64_t limit;
+      size_t len = sizeof(limit);
+      PCHECK(sysctlbyname("kern.maxfilesperproc", &limit, &len, nullptr, 0) == 0);
+      l.rlim_max = limit;
+    }
+#endif
     if (l.rlim_cur < l.rlim_max) {
       LOG(INFO) << Substitute("Raising process file limit from $0 to $1",
                               l.rlim_cur, l.rlim_max);