You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2017/08/11 21:49:49 UTC

[1/2] kudu git commit: [java] Remove double brackets from wrapper script

Repository: kudu
Updated Branches:
  refs/heads/master 71454b69a -> ce6ecc5a5


[java] Remove double brackets from wrapper script

When running on Jenkins the gradle wrapper script causes:
`[[: not found`

This is because the wrapper script is a shell script
and not a bash script. In that case [[ is not built in.

Change-Id: I839c47bbef8bf901047b9379be958f4cebbd406e
Reviewed-on: http://gerrit.cloudera.org:8080/7655
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>


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

Branch: refs/heads/master
Commit: 12084b3b9fad4019ab5a29b039d74844d2224368
Parents: 71454b6
Author: Grant Henke <gr...@gmail.com>
Authored: Thu Aug 10 22:32:40 2017 -0500
Committer: Todd Lipcon <to...@apache.org>
Committed: Fri Aug 11 05:43:01 2017 +0000

----------------------------------------------------------------------
 java/gradle/wrapper.gradle | 2 +-
 java/gradlew               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/12084b3b/java/gradle/wrapper.gradle
----------------------------------------------------------------------
diff --git a/java/gradle/wrapper.gradle b/java/gradle/wrapper.gradle
index 4efab86..1504308 100644
--- a/java/gradle/wrapper.gradle
+++ b/java/gradle/wrapper.gradle
@@ -35,7 +35,7 @@ task bootstrapWrapper() {
 
 
     def boostrapString = """
-      if [[ ! -e $wrapperJarPath ]]; then
+      if [ ! -e $wrapperJarPath ]; then
          curl -o $wrapperJarPath $wrapperJarUrl
       fi
       """.stripIndent()

http://git-wip-us.apache.org/repos/asf/kudu/blob/12084b3b/java/gradlew
----------------------------------------------------------------------
diff --git a/java/gradlew b/java/gradlew
index 93678fd..eae4091 100755
--- a/java/gradlew
+++ b/java/gradlew
@@ -65,7 +65,7 @@ case "`uname`" in
 esac
 
 
-if [[ ! -e $APP_HOME/gradle/wrapper/gradle-wrapper.jar ]]; then
+if [ ! -e $APP_HOME/gradle/wrapper/gradle-wrapper.jar ]; then
    curl -o $APP_HOME/gradle/wrapper/gradle-wrapper.jar https://raw.githubusercontent.com/gradle/gradle/v4.0.2/gradle/wrapper/gradle-wrapper.jar
 fi
 


[2/2] kudu git commit: log block manager: Reorder class declaration of LogWritableBlock

Posted by ad...@apache.org.
log block manager: Reorder class declaration of LogWritableBlock

Reordered class declaration of LogWritableBlock to avoid the
intermingling of LogBlockContainer and LogWritableBlock definitions
in future when adding new methods.

Change-Id: I0a5192cccac1931fd1f65b11fa0739090e8368e2
Reviewed-on: http://gerrit.cloudera.org:8080/7595
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


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

Branch: refs/heads/master
Commit: ce6ecc5a51ae2c25b5b47fe9a05b989586cbfd93
Parents: 12084b3
Author: hahao <ha...@cloudera.com>
Authored: Fri Aug 4 16:02:58 2017 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Fri Aug 11 21:49:17 2017 +0000

----------------------------------------------------------------------
 src/kudu/fs/log_block_manager.cc | 134 +++++++++++++++++-----------------
 1 file changed, 69 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/ce6ecc5a/src/kudu/fs/log_block_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/log_block_manager.cc b/src/kudu/fs/log_block_manager.cc
index 85ded3c..c1bba27 100644
--- a/src/kudu/fs/log_block_manager.cc
+++ b/src/kudu/fs/log_block_manager.cc
@@ -221,6 +221,74 @@ class LogBlock : public RefCountedThreadSafe<LogBlock> {
 };
 
 ////////////////////////////////////////////////////////////
+// LogWritableBlock (declaration)
+////////////////////////////////////////////////////////////
+
+// A log-backed block that has been opened for writing.
+//
+// There's no reference to a LogBlock as this block has yet to be
+// persisted.
+class LogWritableBlock : public WritableBlock {
+ public:
+  enum SyncMode {
+    SYNC,
+    NO_SYNC
+  };
+
+  LogWritableBlock(LogBlockContainer* container, BlockId block_id,
+                   int64_t block_offset);
+
+  virtual ~LogWritableBlock();
+
+  virtual Status Close() OVERRIDE;
+
+  virtual Status Abort() OVERRIDE;
+
+  virtual const BlockId& id() const OVERRIDE;
+
+  virtual BlockManager* block_manager() const OVERRIDE;
+
+  virtual Status Append(const Slice& data) OVERRIDE;
+
+  virtual Status AppendV(const vector<Slice>& data) OVERRIDE;
+
+  virtual Status FlushDataAsync() OVERRIDE;
+
+  virtual size_t BytesAppended() const OVERRIDE;
+
+  virtual State state() const OVERRIDE;
+
+  // Actually close the block, possibly synchronizing its dirty data and
+  // metadata to disk.
+  Status DoClose(SyncMode mode);
+
+  // Write this block's metadata to disk.
+  //
+  // Does not synchronize the written data; that takes place in Close().
+  Status AppendMetadata();
+
+ private:
+  // The owning container. Must outlive the block.
+  LogBlockContainer* container_;
+
+  // The block's identifier.
+  const BlockId block_id_;
+
+  // The block's offset within the container. Known from the moment the
+  // block is created.
+  const int64_t block_offset_;
+
+  // The block's length. Changes with each Append().
+  int64_t block_length_;
+
+  // The state of the block describing where it is in the write lifecycle,
+  // for example, has it been synchronized to disk?
+  WritableBlock::State state_;
+
+  DISALLOW_COPY_AND_ASSIGN(LogWritableBlock);
+};
+
+////////////////////////////////////////////////////////////
 // LogBlockContainer
 ////////////////////////////////////////////////////////////
 
@@ -1079,73 +1147,9 @@ void LogBlock::Delete() {
 }
 
 ////////////////////////////////////////////////////////////
-// LogWritableBlock
+// LogWritableBlock (definition)
 ////////////////////////////////////////////////////////////
 
-// A log-backed block that has been opened for writing.
-//
-// There's no reference to a LogBlock as this block has yet to be
-// persisted.
-class LogWritableBlock : public WritableBlock {
- public:
-  enum SyncMode {
-    SYNC,
-    NO_SYNC
-  };
-
-  LogWritableBlock(LogBlockContainer* container, BlockId block_id,
-                   int64_t block_offset);
-
-  virtual ~LogWritableBlock();
-
-  virtual Status Close() OVERRIDE;
-
-  virtual Status Abort() OVERRIDE;
-
-  virtual const BlockId& id() const OVERRIDE;
-
-  virtual BlockManager* block_manager() const OVERRIDE;
-
-  virtual Status Append(const Slice& data) OVERRIDE;
-
-  virtual Status AppendV(const vector<Slice>& data) OVERRIDE;
-
-  virtual Status FlushDataAsync() OVERRIDE;
-
-  virtual size_t BytesAppended() const OVERRIDE;
-
-  virtual State state() const OVERRIDE;
-
-  // Actually close the block, possibly synchronizing its dirty data and
-  // metadata to disk.
-  Status DoClose(SyncMode mode);
-
-  // Write this block's metadata to disk.
-  //
-  // Does not synchronize the written data; that takes place in Close().
-  Status AppendMetadata();
-
- private:
-  // The owning container. Must outlive the block.
-  LogBlockContainer* container_;
-
-  // The block's identifier.
-  const BlockId block_id_;
-
-  // The block's offset within the container. Known from the moment the
-  // block is created.
-  const int64_t block_offset_;
-
-  // The block's length. Changes with each Append().
-  int64_t block_length_;
-
-  // The state of the block describing where it is in the write lifecycle,
-  // for example, has it been synchronized to disk?
-  WritableBlock::State state_;
-
-  DISALLOW_COPY_AND_ASSIGN(LogWritableBlock);
-};
-
 LogWritableBlock::LogWritableBlock(LogBlockContainer* container,
                                    BlockId block_id, int64_t block_offset)
     : container_(container),