<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Beeline sample with -u -f -n -p in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96808#M60128</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/273/rxu.html" nodeid="273"&gt;@rxu@hortonworks.com&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;This worked for me &lt;/P&gt;&lt;P&gt;[root@nsfed01 ~]#  beeline -u jdbc:hive2://n2:10000/default -n hive -p hive -f f.sql&lt;/P&gt;&lt;P&gt;SLF4J: See &lt;A href="http://www.slf4j.org/codes.html#multiple_bindings" target="_blank"&gt;http://www.slf4j.org/codes.html#multiple_bindings&lt;/A&gt; for an explanation.&lt;/P&gt;&lt;P&gt;SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]&lt;/P&gt;&lt;P&gt;Connecting to jdbc:hive2://n2:10000/default&lt;/P&gt;&lt;P&gt;Connected to: Apache Hive (version 1.2.1.2.3.2.0-2950)&lt;/P&gt;&lt;P&gt;Driver: Hive JDBC (version 1.2.1.2.3.2.0-2950)&lt;/P&gt;&lt;P&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://n2:10000/default&amp;gt; select * from test;&lt;/P&gt;&lt;P&gt;+----------+-----------+--+&lt;/P&gt;&lt;P&gt;| test.id  | test.val  |&lt;/P&gt;&lt;P&gt;+----------+-----------+--+&lt;/P&gt;&lt;P&gt;+----------+-----------+--+&lt;/P&gt;&lt;P&gt;No rows selected (0.767 seconds)&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://n2:10000/default&amp;gt; &lt;/P&gt;&lt;P&gt;Closing: 0: jdbc:hive2://n2:10000/default&lt;/P&gt;&lt;P&gt;[root@nsfed01 ~]#&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2015 02:49:12 GMT</pubDate>
    <dc:creator>nsabharwal</dc:creator>
    <dc:date>2015-11-11T02:49:12Z</dc:date>
    <item>
      <title>Beeline sample with -u -f -n -p</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96806#M60126</link>
      <description>&lt;P&gt;Client tries to execute hive sql inside a file via Beeline.&lt;/P&gt;&lt;P&gt;Anyone has working sample of how to use "beeline -u &amp;lt;url&amp;gt; -n &amp;lt;user&amp;gt; -f &amp;lt;file&amp;gt; -p &amp;lt;password&amp;gt;"? I have tried this, but does not work.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 02:05:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96806#M60126</guid>
      <dc:creator>rxu</dc:creator>
      <dc:date>2015-11-11T02:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline sample with -u -f -n -p</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96807#M60127</link>
      <description>&lt;PRE&gt;/usr/hdp/current/hive-client/bin/beeline -n hrt_qa -p pwd -u "jdbc:hive2://host:2181,host2:2181,host3:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --outputformat=tsv -f /grid/0/hadoopqe/artifacts/tmp-820871&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Nov 2015 02:09:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96807#M60127</guid>
      <dc:creator>tsaito</dc:creator>
      <dc:date>2015-11-11T02:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline sample with -u -f -n -p</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96808#M60128</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/273/rxu.html" nodeid="273"&gt;@rxu@hortonworks.com&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;This worked for me &lt;/P&gt;&lt;P&gt;[root@nsfed01 ~]#  beeline -u jdbc:hive2://n2:10000/default -n hive -p hive -f f.sql&lt;/P&gt;&lt;P&gt;SLF4J: See &lt;A href="http://www.slf4j.org/codes.html#multiple_bindings" target="_blank"&gt;http://www.slf4j.org/codes.html#multiple_bindings&lt;/A&gt; for an explanation.&lt;/P&gt;&lt;P&gt;SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]&lt;/P&gt;&lt;P&gt;Connecting to jdbc:hive2://n2:10000/default&lt;/P&gt;&lt;P&gt;Connected to: Apache Hive (version 1.2.1.2.3.2.0-2950)&lt;/P&gt;&lt;P&gt;Driver: Hive JDBC (version 1.2.1.2.3.2.0-2950)&lt;/P&gt;&lt;P&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://n2:10000/default&amp;gt; select * from test;&lt;/P&gt;&lt;P&gt;+----------+-----------+--+&lt;/P&gt;&lt;P&gt;| test.id  | test.val  |&lt;/P&gt;&lt;P&gt;+----------+-----------+--+&lt;/P&gt;&lt;P&gt;+----------+-----------+--+&lt;/P&gt;&lt;P&gt;No rows selected (0.767 seconds)&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://n2:10000/default&amp;gt; &lt;/P&gt;&lt;P&gt;Closing: 0: jdbc:hive2://n2:10000/default&lt;/P&gt;&lt;P&gt;[root@nsfed01 ~]#&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 02:49:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96808#M60128</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2015-11-11T02:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline sample with -u -f -n -p</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96809#M60129</link>
      <description>&lt;P&gt;Forgot to mention, user does not want to show his password in plaintext, he wants to type in prompt...&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 02:57:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96809#M60129</guid>
      <dc:creator>rxu</dc:creator>
      <dc:date>2015-11-11T02:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline sample with -u -f -n -p</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96810#M60130</link>
      <description>&lt;P&gt;Forgot to mention, user does not want to show his password in plaintext, he wants to type in prompt...&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 02:57:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96810#M60130</guid>
      <dc:creator>rxu</dc:creator>
      <dc:date>2015-11-11T02:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline sample with -u -f -n -p</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96811#M60131</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/273/rxu.html" nodeid="273" target="_blank"&gt;@rxu@hortonworks.com&lt;/A&gt;&lt;P&gt;You can use &lt;A target="_blank" href="https://gist.github.com/nsabharwal/1a75f2ca99ec72c57e15" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://gist.github.com/nsabharwal/1a75f2ca99ec72c57e15" rel="nofollow noopener noreferrer"&gt;&lt;/A&gt;and if you want to prompt for password only then here you go&lt;/P&gt;&lt;P&gt;[root@nsfed01 ~]# cat r1.sh &lt;/P&gt;&lt;P&gt;#read -p "enter HS2 hostname: " HS2&lt;/P&gt;&lt;P&gt;#read -p "enter username: " username&lt;/P&gt;&lt;P&gt;echo "enter password"&lt;/P&gt;&lt;P&gt;read  -s passwd&lt;/P&gt;&lt;P&gt;#read -p "enter filename: " filename&lt;/P&gt;&lt;P&gt;beeline -u jdbc:hive2://n3:10000/default -n neeraj -p $passwd -f f.sql &lt;/P&gt;&lt;P&gt;[root@nsfed01 ~]#&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="447-screen-shot-2015-11-11-at-115427-am.png" style="width: 1116px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23998iF400C711D4509A39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="447-screen-shot-2015-11-11-at-115427-am.png" alt="447-screen-shot-2015-11-11-at-115427-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:51:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-sample-with-u-f-n-p/m-p/96811#M60131</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2019-08-19T12:51:56Z</dc:date>
    </item>
  </channel>
</rss>

