You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2018/05/16 12:41:28 UTC

[1/2] kudu git commit: [tools] Fix and simplify tablet summary spacing

Repository: kudu
Updated Branches:
  refs/heads/master 61cd9510f -> eb81a04db


[tools] Fix and simplify tablet summary spacing

ee0a75c5a2 attempted to fix spacing of tablet summaries but
messed up the case when a tablet is healthy, causing ksck to
print an empty line for every healthy tablet. This fixes that
and simplifies how the spacing is done.

I tested manually that this produces well-spaced output in the
three cases:
1. No tablets.
2. All healthy tablets in PLAIN_CONCISE mode (so no tablet info printed).
3. Some unhealthy tablets.

Change-Id: Ia1a9acfc27733e9c1df15cfe5cfc7822b0ca7304
Reviewed-on: http://gerrit.cloudera.org:8080/10416
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>


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

Branch: refs/heads/master
Commit: 93caf4473f2fb22fbb4cdc42d5f3b24f5d26f475
Parents: 61cd951
Author: Will Berkeley <wd...@apache.org>
Authored: Tue May 15 13:53:09 2018 -0700
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Tue May 15 22:30:34 2018 +0000

----------------------------------------------------------------------
 src/kudu/tools/ksck_results.cc | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/93caf447/src/kudu/tools/ksck_results.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/ksck_results.cc b/src/kudu/tools/ksck_results.cc
index 29776a6..adcbfd7 100644
--- a/src/kudu/tools/ksck_results.cc
+++ b/src/kudu/tools/ksck_results.cc
@@ -204,9 +204,6 @@ Status KsckResults::PrintTo(PrintMode mode, ostream& out) {
 
   // Then, on each tablet.
   RETURN_NOT_OK(PrintTabletSummaries(tablet_summaries, mode, out));
-  if (!tablet_summaries.empty()) {
-    out << endl;
-  }
 
   // Then, summarize the tablets by table.
   // Sort the tables so unhealthy tables are easy to see at the bottom.
@@ -328,16 +325,10 @@ Status PrintTabletSummaries(const vector<KsckTabletSummary>& tablet_summaries,
                             PrintMode mode,
                             ostream& out) {
   if (tablet_summaries.empty()) {
-    out << "The cluster doesn't have any matching tablets" << endl;
+    out << "The cluster doesn't have any matching tablets" << endl << endl;
     return Status::OK();
   }
-  bool first = true;
   for (const auto& tablet_summary : tablet_summaries) {
-    if (first) {
-      first = false;
-    } else {
-      out << endl;
-    }
     if (mode != PrintMode::PLAIN_FULL &&
         tablet_summary.result == KsckCheckResult::HEALTHY) {
       continue;
@@ -387,6 +378,7 @@ Status PrintTabletSummaries(const vector<KsckTabletSummary>& tablet_summaries,
       }
     }
     RETURN_NOT_OK(PrintConsensusMatrix(ts_uuids, master_cstate, consensus_state_map, out));
+    out << endl;
   }
   return Status::OK();
 }


[2/2] kudu git commit: [Java] Add the RangeSchema.getColumnIds

Posted by gr...@apache.org.
[Java] Add the RangeSchema.getColumnIds

Currently RangeSchema has a method that returns column
IDs called getColumns. Because the return type is a list
of integers it’s unclear if the integers are column indexes
or column IDs.

This change matches the HashBucketSchema by
naming the method getColumnIds. It also deprecates
the old method, and adds Javadoc to make the return
value clear.

Change-Id: Ie4fd944d6b38a2b3fd0ab7f8d6c254be380b2972
Reviewed-on: http://gerrit.cloudera.org:8080/10390
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Dan Burkert <da...@apache.org>


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

Branch: refs/heads/master
Commit: eb81a04db9a9d3f9eaf5bc685d787bd4f908daea
Parents: 93caf44
Author: Grant Henke <gr...@apache.org>
Authored: Mon May 14 12:46:20 2018 -0500
Committer: Grant Henke <gr...@apache.org>
Committed: Wed May 16 02:42:22 2018 +0000

----------------------------------------------------------------------
 .../org/apache/kudu/client/PartitionSchema.java     | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/eb81a04d/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java b/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
index 29dc28d..502eea6 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
@@ -109,9 +109,23 @@ public class PartitionSchema {
       this.columns = columns;
     }
 
+    /**
+     * Gets the column IDs of the columns in the range partition.
+     * @return the column IDs of the columns in the range partition
+     * @deprecated Use {@link #getColumnIds} instead.
+     */
+    @Deprecated
     public List<Integer> getColumns() {
       return columns;
     }
+
+    /**
+     * Gets the column IDs of the columns in the range partition.
+     * @return the column IDs of the columns in the range partition
+     */
+    public List<Integer> getColumnIds() {
+      return columns;
+    }
   }
 
   public static class HashBucketSchema {
@@ -127,7 +141,7 @@ public class PartitionSchema {
 
     /**
      * Gets the column IDs of the columns in the hash partition.
-     * @return the column IDs of the columns in the has partition
+     * @return the column IDs of the columns in the hash partition
      */
     public List<Integer> getColumnIds() {
       return columnIds;