Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Error trying to run Data Science with Hadoop: Predicting Airline Delays – Part 2

Explorer

I'm trying to run the zeppelin notebook for Data Science with Hadoop: Predicting Airline Delays – Part 2.

In the first paragraph I'm getting the java errors below - I assume that I'm not importing a class that I need but any help is greatly appreciated!

===============================================================================================

import org.apache.spark.rdd._

import scala.collection.JavaConverters._

import au.com.bytecode.opencsv.CSVReader

import java.io._

import org.joda.time._

import org.joda.time.format._

<console>:44: error: not found: type DateTime val sampleDate = new DateTime(year, month, day, 0, 0) ^

<console>:47: error: not found: value DateTimeFormat val holiday = DateTimeFormat.forPattern("MM/dd/yyyy").parseDateTime(c) ^

<console>:48: error: not found: value Days val distance = Math.abs(Days.daysBetween(holiday, sampleDate).getDays)

3 REPLIES 3

@Scott McDowell

I don't think you are missing an import statement. Looking at your code snippet, you have mentioned

import org.joda.time._        //DateTime and Days come from this import
import org.joda.time.format._     //This import gives us DateTimeFormat

Please verify if you have mentioned all the import correctly. You should be able to use the aforementioned functions if such is the case.

@Scott McDowell

Did the answer help in the resolution of your query? Please close the thread by marking the answer as Accepted!

Explorer

Thanks for your response!

Yes, I have those import statements and it's still not working.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.