Jackie
Jackie

Reputation: 23527

Spark Context throwing 'error: identifier expected but '[' found.'

I am reading a book that says I should be able to type sc.[\t] and get a response. What I see is...

scala> sc.[\t]
<console>:1: error: identifier expected but '[' found.
       sc.[\t]
          ^
<console>:1: error: identifier expected but ']' found.
       sc.[\t]

This is with spark 1.6.1 connecting to hadoop 2.7.2

The sc command seems to work...

scala> sc
res1: org.apache.spark.SparkContext = org.apache.spark.SparkContext@3cead673

P.S. I have never used Scala in my life.

Upvotes: 1

Views: 1509

Answers (1)

RoyaumeIX
RoyaumeIX

Reputation: 1977

I guess the author meant

scala> sc

When you press tab, you get

scala> sc
sc       scala    schema

Upvotes: 1

Related Questions