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 7ed5a3093 [examples] make C++ example working with HMS-enabled cluster
7ed5a3093 is described below
commit 7ed5a3093cea512990087a04d1f2c60df1bea7fe
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Jun 15 10:35:19 2023 -0700
[examples] make C++ example working with HMS-enabled cluster
To make the example of a Kudu C++ application work in case of
HMS-enabled Kudu cluster, the name of the test table should contain
a database prefix. This patch does just so, so the example now
works against both types of Kudu clusters: with and without HMS
integration.
Change-Id: I0c2e952fb1434111cbcbef7289713c268ceebf62
Reviewed-on: http://gerrit.cloudera.org:8080/20080
Reviewed-by: Attila Bukor <[email protected]>
Tested-by: Kudu Jenkins
---
examples/cpp/example.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/cpp/example.cc b/examples/cpp/example.cc
index 5d17ac248..84511cbea 100644
--- a/examples/cpp/example.cc
+++ b/examples/cpp/example.cc
@@ -274,7 +274,11 @@ int main(int argc, char* argv[]) {
master_addrs.push_back(argv[i]);
}
- const string kTableName = "test_table";
+ // Kudu doesn't have a notion of a database namespace, but if the integration
+ // with HMS (Hive MetaStore) is enabled, there are restriction on the name
+ // of tables that can be created, so this example adds the 'db' prefix to
+ // make it work both with and without HMS integration.
+ const string kTableName = "db.test_table";
// Enable verbose debugging for the client library.
kudu::client::SetVerboseLogLevel(2);