<?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: Joining Streaming Data with HDFS File in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Joining-Streaming-Data-with-HDFS-File/m-p/18550#M2882</link>
    <description>&lt;P&gt;I think you imported just about everything except the one thing you need to get implicit conversions that unlock the functions in PairRDDFunctions, which is where join() is defined. You need:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import org.apache.spark.SparkContext._&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the shell this is imported by default.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Sep 2014 15:14:51 GMT</pubDate>
    <dc:creator>srowen</dc:creator>
    <dc:date>2014-09-10T15:14:51Z</dc:date>
    <item>
      <title>Joining Streaming Data with HDFS File</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Joining-Streaming-Data-with-HDFS-File/m-p/18548#M2881</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am joining my streming data with data which is already present in HDFS. When i use scala shell its working fine, and the data is getting joined.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when i try to compile the same code in eclipse to make as a jar, the joining part is not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please give some suggestion to solve the issue.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am facing the error in the following part..&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;val streamkv = streamrecs.map(_.split("~")).map(r =&amp;gt; ( r(0), (r(5), r(6))))&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;val HDFSlines = sc.textFile("/user/Rest/sample.dat").map(_.split("~")).map(r =&amp;gt; ( r(1), (r(0))))&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;val streamwindow = streamkv.window(Minutes(1))&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;val join = streamwindow.transform(joinRDD =&amp;gt; { joinRDD.join(HDFSlines)} )&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this step i am getting error that &lt;SPAN style="text-decoration: underline;"&gt;Value join is not a member of org.apache.spark.rdd.RDD(String,(String,String)))&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the same code in scala-shell, there its working fine..&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have imported all the necessary packages &amp;nbsp;as below -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import scala.io.Source&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import java.io._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.streaming._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.streaming.StreamingContext._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.api.java.function._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.streaming._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.streaming.api._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.streaming.StreamingContext._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import StreamingContext._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.SparkConf&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.SparkContext&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark._&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.rdd.PairRDDFunctions&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.apache.spark.streaming.dstream.PairDStreamFunctions&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:07:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Joining-Streaming-Data-with-HDFS-File/m-p/18548#M2881</guid>
      <dc:creator>ArunShell</dc:creator>
      <dc:date>2022-09-16T09:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Streaming Data with HDFS File</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Joining-Streaming-Data-with-HDFS-File/m-p/18550#M2882</link>
      <description>&lt;P&gt;I think you imported just about everything except the one thing you need to get implicit conversions that unlock the functions in PairRDDFunctions, which is where join() is defined. You need:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import org.apache.spark.SparkContext._&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the shell this is imported by default.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 15:14:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Joining-Streaming-Data-with-HDFS-File/m-p/18550#M2882</guid>
      <dc:creator>srowen</dc:creator>
      <dc:date>2014-09-10T15:14:51Z</dc:date>
    </item>
  </channel>
</rss>

