Hello World Program

89 views
Skip to first unread message

Shashi Vishwakarma

unread,
Jul 29, 2015, 3:15:46 AM7/29/15
to apex-dev
Hi,

I am pretty much new to Apex. I am expecting some work on Apex in my organization so just started exploring it. I installed Apex on my cluster and i could see some already developed packages present in UI like PI,wordcount etc. But i want to write my own program in Apex.

Can anyone tell me how write a simple word count program in Apex? or if you can redirect me to some good link which i can use to begin with.

Thanks 
Shashi


Chetan Narsude

unread,
Jul 29, 2015, 3:18:01 AM7/29/15
to Shashi Vishwakarma, apex-dev
This should get you started: 
https://github.com/DataTorrent/Malhar/tree/master/demos/wordcount

--
Chetan 
--
You received this message because you are subscribed to the Google Groups "apex-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+u...@googlegroups.com.
To post to this group, send email to apex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apex-dev/5e8d2c09-e987-41a2-a626-8d5695dbc31c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
--
Chetan

Shashi Vishwakarma

unread,
Jul 29, 2015, 3:29:23 AM7/29/15
to apex-dev, che...@iitbombay.org, che...@iitbombay.org
Thanks Chetan, I will go through below link and try to implement it.

Shashi Vishwakarma

unread,
Jul 29, 2015, 4:53:40 AM7/29/15
to apex-dev, che...@iitbombay.org
I was just trying to clone above maven project mentioned in link but it is giving me permission issue.How do i download this?

You received this message because you are subscribed to a topic in the Google Groups "apex-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/apex-dev/tZmEWzgjuW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to apex-dev+u...@googlegroups.com.

To post to this group, send email to apex...@googlegroups.com.

Shashi Vishwakarma

unread,
Jul 29, 2015, 8:23:05 AM7/29/15
to apex-dev, shashi....@gmail.com, che...@iitbombay.org, shashi....@gmail.com
Hi,

I did a quick installation of Apex Datatorrent on my cluster few days back. Today i am trying to run wordcount job on datatorrent but while launching application it is giving me below error.

LICENSE_MANAGER_ERROR error

Cannot get license info from agent


I can see that license is still valid.

LICENSE_EXPIRATION warning

License will expire in 13 day(s)


Can anyone help me on this? How do i start license manager?

Thanks 
Shashi

Gaurav Gupta

unread,
Jul 29, 2015, 11:38:00 AM7/29/15
to Shashi Vishwakarma, apex-dev, che...@iitbombay.org
License Manager is started automatically by the platform. Can you see in the Resource Manager why is License Manager failing?

Thanks
-Gaurav

Shashi Vishwakarma

unread,
Jul 30, 2015, 5:04:44 AM7/30/15
to apex-dev, gau...@datatorrent.com, che...@iitbombay.org, gau...@datatorrent.com
Hi Gaurav

I am getting below exception in resource manager log.Not sure how much this log is useful.

2015-07-30 14:31:45,945 INFO  capacity.ParentQueue (ParentQueue.java:completedContainer(721)) - Re-sorting completed queue: root.default stats: default: capacity=1.0, absoluteCapacity=1.0, usedResources=<memory:0, vCores:0>usedCapacity=0.0, absoluteUsedCapacity=0.0, numApps=1, numContainers=0
2015-07-30 14:31:45,945 INFO  rmapp.RMAppImpl (RMAppImpl.java:handle(668)) - application_1438240424924_0570 State change from FINAL_SAVING to FAILED
2015-07-30 14:31:45,945 INFO  capacity.CapacityScheduler (CapacityScheduler.java:completedContainer(1112)) - Application attempt appattempt_1438240424924_0570_000002 released container container_1438240424924_0570_02_000001 on node: host: thinkbig.bigdatacoe.slave2.td.teradata.com:45454 #containers=0 available=5120 used=0 with event: FINISHED
2015-07-30 14:31:45,945 WARN  resourcemanager.RMAuditLogger (RMAuditLogger.java:logFailure(257)) - USER=dtadmin OPERATION=Application Finished - Failed TARGET=RMAppManager     RESULT=FAILURE  DESCRIPTION=App failed with state: FAILED       PERMISSIONS=Application application_1438240424924_0570 failed 2 times due to AM Container for appattempt_1438240424924_0570_000002 exited with  exitCode: 1 due to: Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException:
org.apache.hadoop.util.Shell$ExitCodeException:
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:505)
        at org.apache.hadoop.util.Shell.run(Shell.java:418)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:650)
        at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:300)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:81)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)


Container exited with a non-zero exit code 1
.Failing this attempt.. Failing the application.        APPID=application_1438240424924_0570
2015-07-30 14:31:45,945 INFO  capacity.CapacityScheduler (CapacityScheduler.java:doneApplicationAttempt(697)) - Application Attempt appattempt_1438240424924_0570_000002 is done. finalState=FAILED
2015-07-30 14:31:45,946 INFO  scheduler.AppSchedulingInfo (AppSchedulingInfo.java:clearRequests(110)) - Application application_1438240424924_0570 requests cleared
2015-07-30 14:31:45,946 INFO  capacity.LeafQueue (LeafQueue.java:removeApplicationAttempt(781)) - Application removed - appId: application_1438240424924_0570 user: dtadmin queue: default #user-pending-applications: 0 #user-active-applications: 0 #queue-pending-applications: 0 #queue-active-applications: 0
2015-07-30 14:31:45,946 INFO  capacity.ParentQueue (ParentQueue.java:removeApplication(520)) - Application removed - appId: application_1438240424924_0570 user: dtadmin leaf-queue of parent: root #applications: 0

Thanks
Shashi

Gaurav Gupta

unread,
Jul 30, 2015, 11:34:41 AM7/30/15
to Shashi Vishwakarma, apex-dev, che...@iitbombay.org
Shashi,

I see 
FAILURE  DESCRIPTION=App failed with state: FAILED       PERMISSIONS=Application application_1438240424924_0570 failed 2 times 

Can you please check if user dtadmin can submit jobs under default queue?


Thanks
-Gaurav

Shashi Vishwakarma

unread,
Aug 6, 2015, 5:10:27 AM8/6/15
to apex-dev, shashi....@gmail.com, che...@iitbombay.org
Hi Gaurav,

Sorry for delayed response.  Do i need to create dtadmin user separately? I just followed datatorrent quick installation process from  this  link and trying to launch a sample application on datatorrent.

Thanks
Shashi 

Thanks
-Gaurav


Thanks
-Gaurav

To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+unsubscribe@googlegroups.com.

To post to this group, send email to apex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apex-dev/5e8d2c09-e987-41a2-a626-8d5695dbc31c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
--
Chetan

--
You received this message because you are subscribed to a topic in the Google Groups "apex-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/apex-dev/tZmEWzgjuW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to apex-dev+u...@googlegroups.com.
To post to this group, send email to apex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apex-dev/70de3313-2ec5-45b1-afaf-f3df530d5c9a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "apex-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+unsubscribe@googlegroups.com.

To post to this group, send email to apex...@googlegroups.com.

pra...@dalvi.co.in

unread,
Aug 6, 2015, 7:54:42 AM8/6/15
to apex-dev, shashi....@gmail.com, che...@iitbombay.org
Hi Shashi,

Can you share following details?
  • Are you trying to run dtgateway for all users (installed at /opt/datatorrent) using dtadmin user OR any local user (installed at /home/user/datatorrent) as a part of Local Limited Installation?
  • Can you try restarting dtgateway?
  • Output of jps command
Thanks,
-Pradeep

Thanks
-Gaurav


Thanks
-Gaurav

To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+u...@googlegroups.com.

To post to this group, send email to apex...@googlegroups.com.

Shashi Vishwakarma

unread,
Aug 7, 2015, 5:28:23 AM8/7/15
to apex-dev, shashi....@gmail.com, che...@iitbombay.org, pra...@dalvi.co.in
Hi Pradeep,

1.Yes dtgateway is running for all users. It is installed under /opt/datatorrent.
2.I tried restarting dtgateway but still i got same error.
3.Output of jps command

9853 Jps
3882 DTGateway

Thanks and Regards,
Shashi

Gaurav Gupta

unread,
Aug 7, 2015, 11:19:55 AM8/7/15
to Shashi Vishwakarma, apex-dev, che...@iitbombay.org, pra...@dalvi.co.in
Hey Shashi,

Which Hadoop distro are you using?
Did you try Datatorrent RTS 3.0 https://www.datatorrent.com/download/?

Thanks
-Gaurav


Thanks
-Gaurav


Thanks
-Gaurav

To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+u...@googlegroups.com.

To post to this group, send email to apex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apex-dev/5e8d2c09-e987-41a2-a626-8d5695dbc31c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
--
Chetan

--
You received this message because you are subscribed to a topic in the Google Groups "apex-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/apex-dev/tZmEWzgjuW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to apex-dev+u...@googlegroups.com.
To post to this group, send email to apex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apex-dev/70de3313-2ec5-45b1-afaf-f3df530d5c9a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "apex-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+u...@googlegroups.com.
To post to this group, send email to apex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apex-dev/c11f7c0a-db0d-4d04-a8d7-7e4d642d4baa%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "apex-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+u...@googlegroups.com.
To post to this group, send email to apex...@googlegroups.com.

priyank...@gmail.com

unread,
Aug 10, 2015, 8:40:17 AM8/10/15
to apex-dev
Hi Shashi,

Why your hadoop services are not running? Look at output of jps command.

-Priyanka

Shashi Vishwakarma

unread,
Aug 10, 2015, 10:05:49 AM8/10/15
to apex-dev, priyank...@gmail.com
Hi Guarav/Priyanka

I am using Hortonworks distribution. There seems to be some issue with java home setting. Anyway I could monitor services from Ambari.
I just downloaded DataTorrent from link given by Gaurav and installed it again. As this moment it is working fine. This edition is much better that previous version that I was using. DataTorrent is pretty cool.

Thanks for your help.

Thanks
Shashi

Gaurav Gupta

unread,
Aug 10, 2015, 11:02:11 AM8/10/15
to Shashi Vishwakarma, apex-dev, priyank...@gmail.com
Shashi,

Good to know that the latest version is working for you...

Thanks
-Gaurav

--
You received this message because you are subscribed to the Google Groups "apex-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apex-dev+u...@googlegroups.com.
To post to this group, send email to apex...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages