Re: Regarding using Scala to develop Apex app.

2016-07-15 Thread Ankit Sarraf
Interesting. Thanks for sharing the link. I surly feel that if DataTorrent
has to expand its roots, it will have to evolve to support as many
languages seamlessly as possible. So it seems to have complete support for
Scala in future.

Also, curious to know if people at DT are thinking of allowing SBT
application build with the apps?

On Jul 14, 2016 11:07 PM, "Akshay S Harale" 
wrote:

Hello,

I found one blog post on writing apex app in scala
.
First I tried simple app it worked very well but when I introduced some
anonymous functions in program, it started throwing kryo serialisation
exception:
*com.esotericsoftware.kryo.KryoException: Class cannot be created (missing
no-arg constructor): com.sample.Aggregator$$anon$1*

My question is : Will Apex have full support for scala in future ?

Regards,
Akshay S. Harale
Software Developer @ Synerzip
Skype – akshayharale

This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient. Any
review, use, distribution, or disclosure by others is strictly prohibited.
If you are not the intended recipient (or authorized to receive information
for the intended recipient), please contact the sender by reply e-mail and
delete all copies of this message.


Re: DataTorrent with SBT: .apa file not created

2016-07-11 Thread Ankit Sarraf
I am using the sbt assembly plugin. I've added screenshot for reference:

[image: Inline image 1]

To give better view of the things:
The java directory inside the src is DT Application
The Scala directory is the Random Kafka Generator.

And on doing the sbt assembly, only AlertDeterminer-assembly-1.0.jar is
created inside the target/scala-2.11/ directory.

To give more information, following are the contents of build.sbt:

name := "AlertDeterminer"

version := "1.0"

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
  "org.apache.kafka" % "kafka_2.11" % "0.9.0.1" % "provided",
  "org.apache.apex" % "malhar-library" % "3.4.0" % "provided",
  "org.apache.apex" % "malhar-contrib" % "3.4.0" % "provided"
)

resolvers += Resolver.sonatypeRepo("public")

Also, are you sure I need to used the sbt-maven-plugin? The reason I am
asking is it is required for working other way round. i.e. pom to build.sbt.

Meanwhile, I am looking for the 2nd option.

Thanks
Ankit.


On Mon, Jul 11, 2016 at 2:56 PM, hsy...@gmail.com <hsy...@gmail.com> wrote:

> I've never used SBT to build Apex application. But I guess you can try 2
> things here
> Use the sbt maven plugin
> https://github.com/shivawu/sbt-maven-plugin
> or use sbt assembly plugin
> https://github.com/sbt/sbt-assembly
>
> In the 2nd way, you need to translate the plugin configuration part in
> pom.xml to sbt scripts.
> The configuration usually look like this
>
> I wish this helps
>
> 
>   maven-assembly-plugin
>   
> 
>   app-package-assembly
>   package
>   
> single
>   
>   
> 
> ${project.artifactId}-${project.version}-apexapp
> false
> 
>   src/assemble/appPackage.xml
> 
> 
>   0755
> 
> 
>   
> ${apex.apppackage.classpath}
> ${apex.core.version}
>         
> ${apex.apppackage.groupid}
> ${project.artifactId}
> 
> ${project.version}
> 
> ${project.name}
> 
> ${project.description}
>   
> 
>   
> 
>   
> 
>
>
> On Mon, Jul 11, 2016 at 2:01 PM, Ankit Sarraf <ankit.sar...@cloudwick.com>
> wrote:
>
>> I am using SBT to create a DataTorrent Application. The project comprises
>> of 2 parts. Part 1 is a Random Kafka Generator built using Scala. Part 2 is
>> the DataTorrent Application (Java) to ingest data, process it, and write to
>> HDFS.
>>
>> There are no errors while doing sbt assembly.
>>
>> Although, Uber JAR is created successfully, .apa file is not created. So
>> does DataTorrent work with SBT?
>>
>> Thanks
>> Ankit.
>>
>
>