Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged scala

0 votes
688 views
1 answer
    I have constructed two dataframes. How can we join multiple Spark dataframes ? For Example : PersonDf, ... combining PersonDf and ProfileDf? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
569 views
1 answer
    I have a DF with a huge parseable metadata as a single string column in a Dataframe, lets call it DFA, ... working or pseudo code. Thanks Sanjay See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
496 views
1 answer
    In Scala I see such feature as object-private variable. From my not very rich Java background I learnt to close ... it for some special case. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
481 views
1 answer
    I want to get the type of a variable at runtime. How do I do this? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
639 views
1 answer
    When should I use reduceLeft, reduceRight, foldLeft, foldRight, scanLeft or scanRight? I want an intuition/ ... with some simple examples. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I read data from a csv file ,but don't have index. I want to add a column from 1 to row's number. What should I do,Thanks (scala) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
880 views
1 answer
    If I want to store an Algebraic Data Type (ADT) (ie a Scala sealed trait hierarchy) within a Spark ... .apache.spark.sql.DataSet[Occupation] See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
499 views
1 answer
    scala> val hi = "Hello "e" hi: String = Hello "e scala> val hi = "go" hi: String = go Within ... This error i understood we cannot reassign val See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
554 views
1 answer
    As I have a collection: List(1, 3,-1, 0, 2, -4, 6) It's easy to make it sorted as: ... partition and collect results on each partition together? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
675 views
1 answer
    scala> val p=sc.textFile("file:///c:/_home/so-posts.xml", 8) //i've 8 cores p: org.apache.spark.rdd ... UI even though the spark-shell prints 8. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
630 views
1 answer
    I have looked at a number of questions online, but they don't seem to do what I'm trying to achieve. I'm ... want to aggregate data? Thanks :) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
722 views
1 answer
    I have each record spread across multiple lines in the input file(Very huge file). Ex: Id: 2 ASIN: ... each multi line record in spark? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
812 views
1 answer
    I saw a solution here but when I tried it doesn't work for me. First I import a cars.csv file : val df = ... didn't change. Can anyone help me ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
691 views
1 answer
    I'm trying to add an "CASE WHEN ... ELSE ..." calculated column to an existing DataFrame, using Scala ... How should I implement this logic? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
591 views
1 answer
    I am learning akka-remoting and this is how my project looks The project structure looks like project/pom.xml project ... }</scalaVersion> </configuration> </plugin> </plugins>...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
595 views
1 answer
    Consider this snippet: object A { val b = c val c = "foo" } println( A.b ) // prints "null" As part ... to the (later) declaration of 'c'. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
538 views
1 answer
    Java 8 introduced a Stream class that resembles Scala's Stream, a powerful lazy construct using which it is ... to achieve this? Thanks. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
562 views
1 answer
    I've defined two tables like this: val tableName = "table1" val tableName2 = "table2" val format = new ... Like using subtract, except etc. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
682 views
1 answer
    I'm trying to use the Source.actorRef method to create an akka.stream.scaladsl.Source object. Something of the ... for your review and response. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
562 views
1 answer
    I understand the use for explicitly typed self-references: trait T { self : T2 => ... } In the body, self is ... is not just an alias for this? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
511 views
1 answer
    What is the difference between methods ## and hashCode? They seem to be outputting the same values no matter which ... it cannot find symbol ##. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    How do I escape a dollar sign in string interpolation? def getCompanion(name: String) = Class.forName(s"my. ... "error: unclosed string literal" See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
654 views
1 answer
    Following is my REPL output. I am not sure why string.split does not work here. val s = "Pedro|groceries|apple|1.42" s: ... e, |, 1, ., 4, 2) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
642 views
1 answer
    Is it an only option to list all the arguments up to 22 as shown in documentation? https://spark.apache.org/ ... 2 arguments at the time) Thanks See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
653 views
1 answer
    I want to check how can we get information about each partition such as total no. of records in each partition ... log or print on the console. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
420 views
1 answer
    I'm pretty sure I'm missing something here, since I'm pretty new to Shapeless and I'm learning, but ... something in my simple example. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
614 views
1 answer
    I have a suite of scalatest tests that test different endpoints of a RESTful API. I really want them separated ... -- shut down http server See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
590 views
1 answer
    This should be an easy one. How do I apply a function to a tuple in Scala? Viz: scala> def f (i : Int, ... ^ scala> grr! Many thanks in advance. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...