<?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>topic Re: Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290501#M60127</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for us the following solution worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add to your libname statement user and password&amp;nbsp;from an account that has the rights to write data to your clusters /user/&amp;lt;username&amp;gt; folder. In our case that was the HUE Username and Password. Our HUE users had a directory within /user on the cluster and the rights to write data to it. So your statement should look sth. like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*--- your statement WITH PW ---*/
libname hdp hadoop subprotocol=hive2
server=dqas1100a 
port=10000 
schema=default
user = &amp;lt;yourusername&amp;gt;
pw = &amp;lt;yourpassword&amp;gt;
;

/* --- our statement that works now, for comparison ---*/
libname myhive 	hadoop subprotocol=hive2 
				port=10000 
				host= "&amp;lt;our_hostname&amp;gt;" 
				schema= "default"
				user = &amp;lt;my_HUE_Username&amp;gt;
				pw = &amp;lt;my_HUE_Password&amp;gt;
				; 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope that works!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2016 15:51:38 GMT</pubDate>
    <dc:creator>JanVanHeyden</dc:creator>
    <dc:date>2016-08-09T15:51:38Z</dc:date>
    <item>
      <title>Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/273230#M54424</link>
      <description>Hi, I'm trying to connect Windows SAS 9.4 to Cloudera hadoop 5.0.1-1-vmware(installed to Oracle VM VirtualBox). As given in SAS forums, I have copied the list of configuration files and jar files to the local Windows directory, and assigned their directory path to SAS_HADOOP_CONFIG_PATH and SAS_HADOOP_JAR_PATH respectively. Please find attached screen captures for the list of Config files and Jar files I got from Cloudera system. Now when I run Proc Hadoop and libname statements, I'm getting errors related to JAVA. Can anyone help me in fixing the issue. Please find below log statements with code and errors. /**Connecting with Proc Hadoop**/ 25 options set=SAS_HADOOP_CONFIG_PATH="D:\hadoop\conf"; 26 options set=SAS_HADOOP_JAR_PATH="D:\hadoop\jarlib"; 27 /* create authdomain in SAS Metadata named "HADOOP" * 28 * copy file from my local file system to HDFS * 29 * HDFS location is /user/sas * 30 *****************************************************/ 31 proc hadoop username='cloudera' password=XXXXXXXXXX verbose; 32 hdfs mkdir='/home/cloudera/Desktop/newdir'; 33 hdfs copytolocal='/home/cloudera/Desktop/samplenew.txt' 34 out='D:\hadoop\sampletest.txt' ; ERROR: java.io.FileNotFoundException: File /home/cloudera/Desktop/samplenew.txt does not exist ERROR: at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java: 511) ERROR: at org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.jav a:724) ERROR: at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501) ERROR: at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397) ERROR: at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337) ERROR: at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289) ERROR: at com.dataflux.hadoop.DFHDFS$10.run(DFHDFS.java:322) ERROR: at java.security.AccessController.doPrivileged(Native Method) ERROR: at javax.security.auth.Subject.doAs(Subject.java:415) ERROR: at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554) ERROR: at com.dataflux.hadoop.DFHDFS.copyToLocal(DFHDFS.java:313) 35 run; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE HADOOP used (Total process time): real time 0.07 seconds cpu time 0.01 seconds /**Connecting with lib statement**/ 36 libname hivelib hadoop server="10.237.22.44" port=22 user="cloudera" password=XXXXXXXXXX 36 ! subprotocol=hive 37 cfg="D:\hadoop\conf\core-site.xml"; ERROR: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space ERROR: Unable to connect to the Hive server. ERROR: Error trying to establish connection. ERROR: Error in the LIBNAME statement.&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12586iCEDE044D8347DF4F/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="list of configuration files.PNG" title="list of configuration files.PNG" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12587iC4B26CF074C68E70/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="list of jar files.PNG" title="list of jar files.PNG" /&gt;</description>
      <pubDate>Thu, 26 May 2016 11:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/273230#M54424</guid>
      <dc:creator>Sudharsan</dc:creator>
      <dc:date>2016-05-26T11:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/273670#M54552</link>
      <description>&lt;P&gt;Hey - In response to the Proc Hadoop question:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue here is that the file that you are attempting to copy is not being found. This is the relevant error line from the java&amp;nbsp;trace back:&amp;nbsp;&lt;SPAN&gt;ERROR: java.io.FileNotFoundException: File /home/cloudera/Desktop/samplenew.txt does not exist&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the path that you are trying to copy, I'm guessing that the file is located on the server's local file system...&amp;nbsp;&lt;SPAN&gt;When you use Proc Hadoop, it only connects to the&amp;nbsp;Hadoop File System (HDFS) and therefore can only access files that are within HDFS.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So a couple suggestions, if you want to use that file, copy it to hdfs using&amp;nbsp;the VM command line and the "hadoop fs -put" &amp;nbsp;or "hadoop fs -copyFromLocal" (it may be 'hdfs dfs' instead of 'hadoop fs' depending on your version of Hadoop). Otherwise, I'd suggest you creating a local file on your Windows box and trying a proc hadoop copyfromlocal to the directory that you create.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your code comment, to put a file on HDFS you'd want to use copyfromlocal. Copyfromlocal will copy a file from your Windows local file system to HDFS on the cloudera VM, while&amp;nbsp;copytolocal will copy a file from HDFS on the cloudera VM to your Windows local file system&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below I have revised your proc hadoop code and included an example of both types of copy statements. The code below would in theory create '/user/sas/newdir' on your Cloudera VM's HDFS, it would then copy a file from your windows box to the Cloudera VM's HDFS, and finally&amp;nbsp;copy it back to your Windows local file system. You would have to correct the X'ed password, and ensure that 'D:\hadoop\sample.txt' existed before running the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;options set=SAS_HADOOP_CONFIG_PATH="D:\hadoop\conf";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;options set=SAS_HADOOP_JAR_PATH="D:\hadoop\jarlib";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;proc hadoop username='cloudera' password=XXXXXXXXXX verbose;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;hdfs mkdir='/user/sas/newdir';&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;hdfs copyfromlocal='D:\hadoop\sample.txt'&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;out='/user/sas/samplenew.txt' ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;hdfs copytolocal='/user/sas/samplenew.txt'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;out='D:\hadoop\sampletest.txt' ; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I do not know much about libname statements, and will not be able to address those errors - but I do hope this gets you running with Proc Hadoop.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 18:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/273670#M54552</guid>
      <dc:creator>alnisley</dc:creator>
      <dc:date>2016-05-27T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/273889#M54594</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I face the same error&lt;STRONG&gt; n&lt;/STRONG&gt;o matter what statement I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect to hadoop&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (server="myserver" subprotocol=hive2 user=&amp;amp;u_name. pwd=&amp;amp;u_pass.);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from connection to hadoop&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;(select var1, count(*) as cnt&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;from default.mytable&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;group by var1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; disconnect from hadoop;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname mylib hadoop subprotocol=hive2 port=10000 host="myhost" schema=default user=&amp;amp;u_name. pw=&amp;amp;u_pass.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;proc freq data=default.mytable;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;tables var1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I´m trying to access 'bigger' tables using those statements on hadoop via SAS STUDIO I get the same Error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;ERROR: Prepare error: Error while processing statement: FAILED: Execution Error, return code 1 from &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org.apache.hadoop.hive.ql.exec.mr.MapRedTask&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems to have sth. to do with the size. If I e.g. do a data step to create a sas table in work out of hive it results in the same error. If i then split the data set using the (obs=100000)-statement it works just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any update or work arround on this would be really helpful. It would be great to manipulate data via SAS directly on hive, no matter how big the data is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2016 11:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/273889#M54594</guid>
      <dc:creator>JanVanHeyden</dc:creator>
      <dc:date>2016-05-30T11:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290499#M60126</link>
      <description>&lt;P&gt;Is this fixed ? I have similar situation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;libname hdp hadoop server=dqas1100a port=10000 schema=default subprotocol=hive2;&lt;/P&gt;&lt;P&gt;ERROR: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: sun.util.calendar.ZoneInfoFile (initialization&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;failure)&lt;/P&gt;&lt;P&gt;ERROR: Error trying to establish connection.&lt;/P&gt;&lt;P&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:35:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290499#M60126</guid>
      <dc:creator>Go</dc:creator>
      <dc:date>2016-08-09T15:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290501#M60127</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for us the following solution worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add to your libname statement user and password&amp;nbsp;from an account that has the rights to write data to your clusters /user/&amp;lt;username&amp;gt; folder. In our case that was the HUE Username and Password. Our HUE users had a directory within /user on the cluster and the rights to write data to it. So your statement should look sth. like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*--- your statement WITH PW ---*/
libname hdp hadoop subprotocol=hive2
server=dqas1100a 
port=10000 
schema=default
user = &amp;lt;yourusername&amp;gt;
pw = &amp;lt;yourpassword&amp;gt;
;

/* --- our statement that works now, for comparison ---*/
libname myhive 	hadoop subprotocol=hive2 
				port=10000 
				host= "&amp;lt;our_hostname&amp;gt;" 
				schema= "default"
				user = &amp;lt;my_HUE_Username&amp;gt;
				pw = &amp;lt;my_HUE_Password&amp;gt;
				; 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope that works!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290501#M60127</guid>
      <dc:creator>JanVanHeyden</dc:creator>
      <dc:date>2016-08-09T15:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Connection between SAS 9.4 and Cloudera Hadoop thru proc hadoop and libname - facing errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290984#M60274</link>
      <description>&lt;P&gt;We have kerberos enabled.. So it doesn't fix , thanks for sharing your thoughts though&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The Hive Kerberos principal string is present in the hive-site.xml file in the SAS_HADOOP_JAR_PATH. The USER= and PASSWORD=&lt;BR /&gt;options cannot not be specified when the Hive Kerberos principal string is present.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 14:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connection-between-SAS-9-4-and-Cloudera-Hadoop-thru-proc-hadoop/m-p/290984#M60274</guid>
      <dc:creator>Go</dc:creator>
      <dc:date>2016-08-11T14:18:23Z</dc:date>
    </item>
  </channel>
</rss>

