You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2016/11/08 22:07:27 UTC
hive git commit: HIVE-15060 : Remove the autoCommit warning from
beeline (Tao Li via Thejas Nair)
Repository: hive
Updated Branches:
refs/heads/master f42021125 -> 0a26c4885
HIVE-15060 : Remove the autoCommit warning from beeline (Tao Li via Thejas Nair)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/0a26c488
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0a26c488
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0a26c488
Branch: refs/heads/master
Commit: 0a26c4885046891ba4339e8dae830a74a7e226d5
Parents: f420211
Author: Tao Li <tl...@hortonworks.com>
Authored: Tue Nov 8 14:07:19 2016 -0800
Committer: Thejas Nair <th...@hortonworks.com>
Committed: Tue Nov 8 14:07:19 2016 -0800
----------------------------------------------------------------------
.../java/org/apache/hive/beeline/BeeLineOpts.java | 2 +-
.../apache/hive/beeline/TestBeelineArgParsing.java | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/0a26c488/beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java b/beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java
index 57b9c46..9f330e3 100644
--- a/beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java
+++ b/beeline/src/java/org/apache/hive/beeline/BeeLineOpts.java
@@ -71,7 +71,7 @@ class BeeLineOpts implements Completer {
private boolean showDbInPrompt = false;
private int headerInterval = 100;
private boolean fastConnect = true;
- private boolean autoCommit = false;
+ private boolean autoCommit = true;
private boolean verbose = false;
private boolean force = false;
private boolean incremental = true;
http://git-wip-us.apache.org/repos/asf/hive/blob/0a26c488/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
----------------------------------------------------------------------
diff --git a/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java b/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
index 78925e0..d73d374 100644
--- a/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
+++ b/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
@@ -188,6 +188,23 @@ public class TestBeelineArgParsing {
}
@Test
+ public void testBeelineAutoCommit() throws Exception {
+ TestBeeline bl = new TestBeeline();
+ String[] args = {};
+ bl.initArgs(args);
+ Assert.assertTrue(bl.getOpts().getAutoCommit());
+
+ args = new String[] {"--autoCommit=false"};
+ bl.initArgs(args);
+ Assert.assertFalse(bl.getOpts().getAutoCommit());
+
+ args = new String[] {"--autoCommit=true"};
+ bl.initArgs(args);
+ Assert.assertTrue(bl.getOpts().getAutoCommit());
+ bl.close();
+ }
+
+ @Test
public void testBeelineShowDbInPromptOptsDefault() throws Exception {
TestBeeline bl = new TestBeeline();
String args[] = new String[] { "-u", "url" };