This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new d8b8d0e [client] reorder methods for KuduSession in client.cc
d8b8d0e is described below
commit d8b8d0ead5b534ee7a9b901050e0d16d87efe3d1
Author: Alexey Serbin <[email protected]>
AuthorDate: Tue Oct 20 18:21:40 2020 -0700
[client] reorder methods for KuduSession in client.cc
While adding new methods into KuduSession, I found it a bit annoying
that the order of methods in *.h file differ from the order of those
in *.cc file. This patch addresses this nit.
This patch does not contain any functional changes.
Change-Id: Ic91c74642070b3324e4d6f909f61013913c0bcc6
Reviewed-on: http://gerrit.cloudera.org:8080/16617
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
---
src/kudu/client/client.cc | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/kudu/client/client.cc b/src/kudu/client/client.cc
index b460165..16819ac 100644
--- a/src/kudu/client/client.cc
+++ b/src/kudu/client/client.cc
@@ -1162,10 +1162,6 @@ KuduSession::~KuduSession() {
delete data_;
}
-Status KuduSession::Close() {
- return data_->Close(false);
-}
-
Status KuduSession::SetFlushMode(FlushMode m) {
if (!tight_enum_test<FlushMode>(m)) {
// Be paranoid in client code.
@@ -1203,6 +1199,17 @@ void KuduSession::SetTimeoutMillis(int timeout_ms) {
data_->SetTimeoutMillis(timeout_ms);
}
+Status KuduSession::Apply(KuduWriteOperation* write_op) {
+ RETURN_NOT_OK(data_->ApplyWriteOp(write_op));
+ // Thread-safety note: this method should not be called concurrently
+ // with other methods which modify the KuduSession::Data members, so it
+ // should be safe to read KuduSession::Data members without protection.
+ if (data_->flush_mode_ == AUTO_FLUSH_SYNC) {
+ RETURN_NOT_OK(data_->Flush());
+ }
+ return Status::OK();
+}
+
Status KuduSession::Flush() {
return data_->Flush();
}
@@ -1211,19 +1218,12 @@ void KuduSession::FlushAsync(KuduStatusCallback*
user_callback) {
data_->FlushAsync(user_callback);
}
-bool KuduSession::HasPendingOperations() const {
- return data_->HasPendingOperations();
+Status KuduSession::Close() {
+ return data_->Close(false);
}
-Status KuduSession::Apply(KuduWriteOperation* write_op) {
- RETURN_NOT_OK(data_->ApplyWriteOp(write_op));
- // Thread-safety note: this method should not be called concurrently
- // with other methods which modify the KuduSession::Data members, so it
- // should be safe to read KuduSession::Data members without protection.
- if (data_->flush_mode_ == AUTO_FLUSH_SYNC) {
- RETURN_NOT_OK(data_->Flush());
- }
- return Status::OK();
+bool KuduSession::HasPendingOperations() const {
+ return data_->HasPendingOperations();
}
int KuduSession::CountBufferedOperations() const {