[jira] [Commented] (EDGENT-428) Adding support for csv in MetricsSetup

2017-07-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EDGENT-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16093968#comment-16093968
 ] 

ASF GitHub Bot commented on EDGENT-428:
---

GitHub user thomascristanis opened a pull request:

https://github.com/apache/incubator-edgent/pull/315

[EDGENT-428] Adding support for csv in MetricsSetup

In the current project status only had the support will JMX. So it was 
implementing the support to generate ._csv_ files in accordance with [metrics 
library](http://metrics.dropwizard.io/3.1.0/manual/core/#man-core-reporters-csv)
 already used in the project.

[[EDGENT-428] Adding support for csv in 
MetricsSetup](https://issues.apache.org/jira/browse/EDGENT-428)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/thomascristanis/incubator-edgent master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-edgent/pull/315.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #315


commit fe7c3c21fbb168fd0159e8bbf8848f1beba757c6
Author: Thomas Cristanis 
Date:   2017-07-19T23:35:56Z

Implemented support for csv. Which periodically appends to a set of .csv 
files in a given directory




> Adding support for csv in MetricsSetup
> --
>
> Key: EDGENT-428
> URL: https://issues.apache.org/jira/browse/EDGENT-428
> Project: Edgent
>  Issue Type: New Feature
>  Components: Utils
>Affects Versions: Apache Edgent 1.1.0
> Environment: Raspberry PI
>Reporter: Thomas Cristanis Cabral Nogueira
>Priority: Minor
>  Labels: features
> Fix For: Apache Edgent 1.1.0
>
> Attachments: Screen Shot 2017-07-18 at 09.34.36.png, Screen Shot 
> 2017-07-18 at 09.35.24.png, Screen Shot 2017-07-19 at 11.48.37.png
>
>
> In the current project status only had the support will JMX. So it was 
> implementing the support to generate .csv files in accordance with [metrics 
> library|http://metrics.dropwizard.io/3.1.0/manual/core/#man-core-reporters-csv]
>  already used in the project.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-edgent pull request #315: [EDGENT-428] Adding support for csv in M...

2017-07-19 Thread thomascristanis
GitHub user thomascristanis opened a pull request:

https://github.com/apache/incubator-edgent/pull/315

[EDGENT-428] Adding support for csv in MetricsSetup

In the current project status only had the support will JMX. So it was 
implementing the support to generate ._csv_ files in accordance with [metrics 
library](http://metrics.dropwizard.io/3.1.0/manual/core/#man-core-reporters-csv)
 already used in the project.

[[EDGENT-428] Adding support for csv in 
MetricsSetup](https://issues.apache.org/jira/browse/EDGENT-428)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/thomascristanis/incubator-edgent master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-edgent/pull/315.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #315


commit fe7c3c21fbb168fd0159e8bbf8848f1beba757c6
Author: Thomas Cristanis 
Date:   2017-07-19T23:35:56Z

Implemented support for csv. Which periodically appends to a set of .csv 
files in a given directory




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-edgent pull request #314: Adding support for csv in MetricsSetup

2017-07-19 Thread thomascristanis
Github user thomascristanis closed the pull request at:

https://github.com/apache/incubator-edgent/pull/314


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-edgent pull request #309: Migration of the Edgent project to be ab...

2017-07-19 Thread dlaboss
Github user dlaboss commented on a diff in the pull request:

https://github.com/apache/incubator-edgent/pull/309#discussion_r128331174
  
--- Diff: connectors/kafka/pom.xml ---
@@ -42,7 +42,12 @@
   org.apache.kafka
   kafka_2.10
   0.8.2.2
-  provided
+  
+
+  *
+  *
+
+  
--- End diff --

I just verified that each of these non-edgent deps need the non-transitive 
specification (not just kafka_2.10).  Without it, copy-dependencies (and uber 
jar) pull in unwanted things relative to the gradle/ant build:

Only in DEPS-WITH-KAFKA-TOO-MUCH/: jline-0.9.94.jar
Only in DEPS-WITH-KAFKA-TOO-MUCH/: lz4-1.2.0.jar
Only in DEPS-WITH-KAFKA-TOO-MUCH/: netty-3.7.0.Final.jar
Only in DEPS-WITH-KAFKA-TOO-MUCH/: slf4j-log4j12-1.6.1.jar
Only in DEPS-WITH-KAFKA-TOO-MUCH/: snappy-java-1.1.1.7.jar





---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-edgent pull request #314: Adding support for csv in MetricsSetup

2017-07-19 Thread thomascristanis
Github user thomascristanis commented on a diff in the pull request:

https://github.com/apache/incubator-edgent/pull/314#discussion_r128312474
  
--- Diff: 
utils/metrics/src/main/java/org/apache/edgent/metrics/MetricsSetup.java ---
@@ -85,6 +92,25 @@ public MetricsSetup startJMXReporter(String 
jmxDomainName) {
 reporter.start();
 return this;
 }
+
+/**
+ * Starts the metric {@code CsvReporter}. If no MBeanServer was set, 
use the
+ * virtual machine's platform MBeanServer.
+ * 
+ * @param pathMetrics
--- End diff --

I'm making some adjustments to a problem that appeared.
Sorry, I will soon put the set code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-edgent pull request #314: Adding support for csv in MetricsSetup

2017-07-19 Thread dlaboss
Github user dlaboss commented on a diff in the pull request:

https://github.com/apache/incubator-edgent/pull/314#discussion_r128304858
  
--- Diff: 
utils/metrics/src/main/java/org/apache/edgent/metrics/MetricsSetup.java ---
@@ -85,6 +92,25 @@ public MetricsSetup startJMXReporter(String 
jmxDomainName) {
 reporter.start();
 return this;
 }
+
+/**
+ * Starts the metric {@code CsvReporter}. If no MBeanServer was set, 
use the
+ * virtual machine's platform MBeanServer.
+ * 
+ * @param pathMetrics
--- End diff --

Sorry, what I was trying to ask does this javadoc need to be adjusted now?  
Can you still supply "null" or a path to a non-existant file?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


developing an Edgent app in the new mvn world

2017-07-19 Thread Dale LaBossiere

Hi Chris,

I’ve been playing with what’s needed / desired for creating an Edgent app in 
the new world.
I wanted to get this out to you ~asap as I’m on vacation next week.

This included identifying what would constitute good pom template info.
I haven’t looked into what it takes to create a new “Edgent quickstart” 
archetype
but you had mentioned creating one in the past so maybe you could help with 
that?  :-)

I wanted to support:
- always write the Edgent app in java8 to be able to use lambdas
- pom is ~independent of other Edgent runtime noms - parent isn’t 
edgent-parent/pom or any of the other edgent noms
- create a über jar for either of the 3 platforms
- create a new standalone “application package” for either of the 3 
platforms
  An app-pkg.tar contains the non-uber app jar, all of the app’s 
dependencies, and a app-run.sh.
  A new package-app.sh constructs the app-pkg.tar:  see 
https://paste.apache.org/HyGO
- the same built non-uber jar can also be used with the get-edgent-jars.sh 
tooling,
  should that be what the user/deployment needs.
  This flow is still a bit rough with respect to composing the classpath.
  More on this one later.

I’ve tested the above using a HelloEdgent app and IotpQuickstart app.
I’ve haven't completed trying with a Kafka Producer sample (close to 
SimplePublisherApp.java)
but it already demonstrates that the kafka connector pom isn’t sufficiently 
“non-transitive” in its dep decls.

This work should also flow into the Edgent samples I think.
e.g., we release a edgent-samples-source bundle whose pom(s) are similar to the 
ones
used here / supporting the same scenarios. The samples bundle would also contain
the package-app.sh and get-edgent-jars.sh tools I think.
Again, we would not release pre-built samples bundle/artifacts.

Here’s the workflow…

CLI - create, build, run/package new Edgent app 

Create - eventually using Edgent archetype
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app 
-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
add things noted below to pom (dependencies, properties, runnable jar, uber 
jar)

copy “hello edgent” into App.java and tweak package

Build:  
mvn clean package -DskipTests# add -Pplatform-java7 or 
-Pplatform-android as needed
yields:
target/my-app-1.0-SNAPSHOT-uber.jar
target/my-app-1.0-SNAPSHOT.jar

Run
- via über jar that was created
java -jar target/my-app-1.0-SNAPSHOT-uber.jar

- via standalone “application package”

# create standalone target/app-pkg.tar
package-app.sh   # add  --platform java7 or --platform android as 
appropriate
…
# copy target/app-pkg.tar to the destination system
# to run the app:
# mkdir app-pkg
# tar xf app-pkg.tar -C app-pkg
# (cd app-pkg; ./app-run.sh)

mkdir SWILL
cp target/app-pkg.tar SWILL
cd SWILL
mkdir app-pkg
tar xf app-pkg.tar -C app-pkg
# switch to j7 to test if appropriate
# sh
# export JAVA_HOME=`/usr/libexec/java_home -v 1.7`   # on OSX
# export PATH=$JAVA_HOME/bin:$PATH
# which java
(cd app-pkg; ./app-run.sh)
Hello
Edgent!
Jul 18, 2017 6:23:51 PM org.apache.edgent.runtime.etiao.Executable$1 accept
INFO: No more active user tasks

=

Here’s what I came up with for additions to the quickstart archetype generated 
pom.
Maybe you’ll see ways to improve upon it.

Link to just the pom fragment:https://paste.apache.org/9Dtm
Link to a full pom for the IotpQuickstart app case:  
https://paste.apache.org/eqaj

— Dale




[jira] [Created] (EDGENT-428) Adding support for csv in MetricsSetup

2017-07-19 Thread Thomas Cristanis Cabral Nogueira (JIRA)
Thomas Cristanis Cabral Nogueira created EDGENT-428:
---

 Summary: Adding support for csv in MetricsSetup
 Key: EDGENT-428
 URL: https://issues.apache.org/jira/browse/EDGENT-428
 Project: Edgent
  Issue Type: New Feature
  Components: Utils
Affects Versions: Apache Edgent 1.1.0
 Environment: Raspberry PI
Reporter: Thomas Cristanis Cabral Nogueira
Priority: Minor
 Fix For: Apache Edgent 1.1.0
 Attachments: Screen Shot 2017-07-18 at 09.34.36.png, Screen Shot 
2017-07-18 at 09.35.24.png, Screen Shot 2017-07-19 at 11.48.37.png

In the current project status only had the support will JMX. So it was 
implementing the support to generate .csv files in accordance with [metrics 
library|http://metrics.dropwizard.io/3.1.0/manual/core/#man-core-reporters-csv] 
already used in the project.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-edgent pull request #314: Adding support for csv in MetricsSetup

2017-07-19 Thread thomascristanis
Github user thomascristanis commented on a diff in the pull request:

https://github.com/apache/incubator-edgent/pull/314#discussion_r128287802
  
--- Diff: 
utils/metrics/src/main/java/org/apache/edgent/metrics/MetricsSetup.java ---
@@ -104,15 +104,6 @@ public MetricsSetup startJMXReporter(String 
jmxDomainName) {
  */
 public MetricsSetup startCSVReporter(String pathMetrics) {
 
-if (pathMetrics == null) { // pathMetrics is NULL
-pathMetrics = createDefaultDirectory();
-} else {
-File directory = new File(pathMetrics);
-if (!directory.exists() && !directory.mkdirs()) {
-pathMetrics = createDefaultDirectory();
-}
-}
-
--- End diff --

No, now it's just the argument of this method:

`public MetricsSetup startCSVReporter(String pathMetrics) {

final CsvReporter reporter = 
CsvReporter.forRegistry(registry()).formatFor(Locale.US)

.convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS)
.build(new File(pathMetrics));
reporter.start(1, TimeUnit.SECONDS);

return this;
}`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-edgent pull request #314: Adding support for csv in MetricsSetup

2017-07-19 Thread dlaboss
Github user dlaboss commented on a diff in the pull request:

https://github.com/apache/incubator-edgent/pull/314#discussion_r128285101
  
--- Diff: 
utils/metrics/src/main/java/org/apache/edgent/metrics/MetricsSetup.java ---
@@ -104,15 +104,6 @@ public MetricsSetup startJMXReporter(String 
jmxDomainName) {
  */
 public MetricsSetup startCSVReporter(String pathMetrics) {
 
-if (pathMetrics == null) { // pathMetrics is NULL
-pathMetrics = createDefaultDirectory();
-} else {
-File directory = new File(pathMetrics);
-if (!directory.exists() && !directory.mkdirs()) {
-pathMetrics = createDefaultDirectory();
-}
-}
-
--- End diff --

Is the pathMetrics javadoc still accurate with this change?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: What's left to do for Maven migration?

2017-07-19 Thread Christofer Dutz
By the way … my pull request for the maven-wrapper is currently being finalized 
… hopefully this will be finished soon and then it will make things even easier 
;-)
https://github.com/takari/maven-wrapper/pull/60

Chris

Am 17.07.17, 16:03 schrieb "Dale LaBossiere" :

Sorry for that confusion.  There are so many details to track / deal with.

The Issues / TODOs in [1] all need to be reviewed and need resolutions.  
Can we just work from that? (marking done items as such, including the 
resolution, and then just doing a strikethrough it the resolved item)

Right now, I think dealing with the binary release bundle and samples are 
the highest priority / largest unknowns.

Thanks for all your continued diligence!

— Dale

> On Jul 17, 2017, at 2:43 AM, Christofer Dutz  
wrote:
> 
> Hi guys,
> 
> So right now, I sort of lost track of what’s still left to do on your 
wish list for a successful maven migration.
> If someone could compile a list of things to do, I would gladly work on 
those issues. Must admit that I lost track a little on the confluence page.
> 
> Chris