[incubator-plc4x] branch develop updated: Fixed some typos ...

2018-12-11 Thread cdutz
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
 new e1dcefe  Fixed some typos ...
e1dcefe is described below

commit e1dcefea30c3ee7a9eb7412560a6bae1fb1d0884
Author: Christofer Dutz 
AuthorDate: Tue Dec 11 16:14:06 2018 +0100

Fixed some typos ...
---
 Jenkinsfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index fd543e5..4effa64 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -202,7 +202,7 @@ pipeline {
 }
 }
 
-// Send out notifications on unsuccessfull builds.
+// Send out notifications on unsuccessful builds.
 post {
 // If this build failed, send an email to the list.
 failure {
@@ -222,7 +222,7 @@ Check console output at "${env.JOB_NAME} [${env.BRANC
 }
 }
 
-// If this build didn't fail, but there were failling tests, send an 
email to the list.
+// If this build didn't fail, but there were failing tests, send an 
email to the list.
 unstable {
 script {
 if(env.BRANCH_NAME == "develop") {
@@ -240,7 +240,7 @@ Check console output at "${env.JOB_NAME} [${env.BRANC
 }
 }
 
-// Send an email, if the last build was not SUCCESSfull and this one 
is.
+// Send an email, if the last build was not successful and this one is.
 success {
 script {
 if ((env.BRANCH_NAME == "develop") && 
(currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 
'SUCCESS')) {



[incubator-plc4x] branch develop updated: Removed an unneeded variable assignment.

2018-12-11 Thread cdutz
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
 new c9278a7  Removed an unneeded variable assignment.
c9278a7 is described below

commit c9278a77006a91ea576f4b552871167eafb4f769
Author: Christofer Dutz 
AuthorDate: Tue Dec 11 15:52:05 2018 +0100

Removed an unneeded variable assignment.
---
 .../apache/plc4x/java/s7/netty/strategies/DefaultS7MessageProcessor.java | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/strategies/DefaultS7MessageProcessor.java
 
b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/strategies/DefaultS7MessageProcessor.java
index 0e92c46..4b1a090 100644
--- 
a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/strategies/DefaultS7MessageProcessor.java
+++ 
b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/strategies/DefaultS7MessageProcessor.java
@@ -281,7 +281,6 @@ public class DefaultS7MessageProcessor implements 
S7MessageProcessor {
 }
 curPayloadBitOffset++;
 if ((i > 0) && ((curPayloadBitOffset % 8) == 0)) {
-curPayloadByteOffset++;
 curPayloadBitOffset = 0;
 }
 }



[incubator-plc4x] branch develop updated: Added a section that reports commits made to the master branch.

2018-12-11 Thread cdutz
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
 new 2fefd99  Added a section that reports commits made to the master 
branch.
2fefd99 is described below

commit 2fefd99f5c693dca0579457b90ab836a36c5a858
Author: Christofer Dutz 
AuthorDate: Tue Dec 11 10:43:07 2018 +0100

Added a section that reports commits made to the master branch.
---
 Jenkinsfile | 17 +
 1 file changed, 17 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 5bda983..91efc56 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -251,6 +251,23 @@ Is back to normal.
 }
 }
 }
+
+always {
+script {
+if(env.BRANCH_NAME == "master") {
+emailext(
+subject: "[COMMIT-TO-MASTER]: A commit to the master 
branch was made'",
+body: """
+COMMIT-TO-MASTER: A commit to the master branch was made:
+
+Check console output at "${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]"
+""",
+to: "d...@plc4x.apache.org",
+recipientProviders: [[$class: 
'DevelopersRecipientProvider']]
+)
+}
+}
+}
 }
 
 }
\ No newline at end of file



[incubator-plc4x] branch develop updated: Make the email code only send emails for develop.

2018-12-11 Thread cdutz
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
 new bf5f708  Make the email code only send emails for develop.
bf5f708 is described below

commit bf5f708fc145d00200d7eed555c261e4e7252881
Author: Christofer Dutz 
AuthorDate: Tue Dec 11 10:40:41 2018 +0100

Make the email code only send emails for develop.
---
 Jenkinsfile | 34 +-
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 02a3f76..5bda983 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -200,36 +200,44 @@ pipeline {
 post {
 // If this build failed, send an email to the list.
 failure {
-emailext(
-subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
-body: """
+script {
+if(env.BRANCH_NAME == "develop") {
+emailext(
+subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+body: """
 BUILD-FAILURE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] 
[${env.BUILD_NUMBER}]':
 
 Check console output at "${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]"
 """,
-to: "d...@plc4x.apache.org",
-recipientProviders: [[$class: 'DevelopersRecipientProvider']]
-)
+to: "d...@plc4x.apache.org",
+recipientProviders: [[$class: 
'DevelopersRecipientProvider']]
+)
+}
+}
 }
 
 // If this build didn't fail, but there were failling tests, send an 
email to the list.
 unstable {
-emailext(
-subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
-body: """
+script {
+if(env.BRANCH_NAME == "develop") {
+emailext(
+subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+body: """
 BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] 
[${env.BUILD_NUMBER}]':
 
 Check console output at "${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]"
 """,
-to: "d...@plc4x.apache.org",
-recipientProviders: [[$class: 'DevelopersRecipientProvider']]
-)
+to: "d...@plc4x.apache.org",
+recipientProviders: [[$class: 
'DevelopersRecipientProvider']]
+)
+}
+}
 }
 
 // Send an email, if the last build was not SUCCESSfull and this one 
is.
 success {
 script {
-if (currentBuild.previousBuild != null && 
currentBuild.previousBuild.result != 'SUCCESS') {
+if ((env.BRANCH_NAME == "develop") && 
(currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 
'SUCCESS')) {
 emailext (
 subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
 body: """



[incubator-plc4x] branch features/scraper-jmx-support updated (44cd030 -> 9caa1b2)

2018-12-11 Thread jfeinauer
This is an automated email from the ASF dual-hosted git repository.

jfeinauer pushed a change to branch features/scraper-jmx-support
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.


 discard 44cd030  [OPM,POOL] Added better defaults for Scrapers 
PlcPooledDriverManager.
 discard 7cb9db0  Added some Logging for Diagnostics in PlcDriverManager.
 discard a39af71  [OPM] Improved logging, better Exception handling.
 discard 2f12488  Adjusted the content of the failure-email
 discard 3a34427  Adjusted the content of the unstable-email
 discard ecdbce8  Fixed the build again ...
 discard e109903  Fixed the compilation error ... now the build should be 
unstable due to a failing test ...
 discard d35702d  PLC4X-78 - Write operations seem to fail - And another ...
 discard a707b10  PLC4X-78 - Write operations seem to fail - And another ...
 discard c586142  PLC4X-78 - Write operations seem to fail - And another ...
 discard fe0b7e9  PLC4X-78 - Write operations seem to fail - And another ... - 
Intentionally breaking the API module to get faster results ...
 discard a88a438  PLC4X-78 - Write operations seem to fail - And another ...
 discard 8a197bf  PLC4X-78 - Write operations seem to fail - And another ...
 discard f5e214b  PLC4X-78 - Write operations seem to fail - And another ...
 discard 78f0959  PLC4X-78 - Write operations seem to fail - And another ...
 discard 81d81b2  PLC4X-78 - Write operations seem to fail - And another ...
 discard 7d4fbac  PLC4X-78 - Write operations seem to fail - And another ...
 discard fa6f124  PLC4X-78 - Write operations seem to fail - And another ...
 discard cac784d  PLC4X-78 - Write operations seem to fail - And another ...
 discard befa846  PLC4X-78 - Write operations seem to fail - Another try of 
fixing the syntax ...
 discard 2be5ee4  PLC4X-78 - Write operations seem to fail - Tried fixing the 
pipeline syntax.
 discard 7a96003  PLC4X-78 - Write operations seem to fail - Inserted a failure 
- Finetuned the Jenkinsfile to send nicer formatted emails and one email if the 
build is back to normal
 discard f6cbcaa  PLC4X-78 - Write operations seem to fail - Made it stable 
again
 discard ddbb7d4  Try to get the email sending working - Intentionally added a 
test-failure
 discard 03210f6  PLC4X-78 - Write operations seem to fail - Fixed a problem 
that was causing a test to fail / Extended the S7PlcTestConnection to dump the 
content of packets not matching the expected packet
 discard 6c06b62  PLC4X-78 - Write operations seem to fail - Fixed a problem 
that was causing a test to fail
 discard 9d87c16  PLC4X-78 - Write operations seem to fail - Continued work on 
the write operations
 discard 6910790  Tried figuring out how to clear the stash
 discard 55101b3  Tried figuring out how to clear the stash
 discard 0c57204  Tried figuring out how to clear the stash
 discard 66e5bff  [plc4x-karaf] remove duplicated plugin management
 discard fc64b6d  - Fixed the guava version as there were CVEs reported with 
the 18.0 version transitively referenced from the ethernet-ip module.
 discard 1af043b  - Removed the commented out slackSending
 discard 3be52ca  - Fixed some things SonarQube was complaining about. - Tried 
to get the deleting of the "local-snapshots-dir" working.
 discard 2a1f17b  - Added the new release.
 discard 245c2db  - Fixed the build by adding a missing dependency.
 discard 458e6ad  adjusted connector implementation
 discard 1a1000a  - Added name and description so the build displays the 
scraper the same way as all the other modules.
 discard cf203be  Made the constructor public so it can also be configured 
programmatically.
 discard 329054f  Fixed some textual errors.
 discard 8130b1e  Removed some now obsolete comment.
 discard 2266622  PLC4X-77 - When the last item in a request is a DINT, the 
DefaultS7MessageProcessor dies with an ArrayIndexOutOfFoundsException
 discard 186d3b2  PLC4X-77 - When the last item in a request is a DINT, the 
DefaultS7MessageProcessor dies with an ArrayIndexOutOfFoundsException
 discard 6f107e4  Made the example take multiple addresses as input
 discard e1d32c9  - Added a cleanup before un-stashing the snapshots to 
hopefully reduce the deploy-time as currently all previous snapshot versions 
were deployed too.
 discard e82a8ce  - Added profiling to the edgent adapter.
 discard b86c2d7  PLC4X-76 - When receiving responses with more than 512 byte, 
the IsoOnTcp protocol doesn't work
 discard e299e38  - Added name and description to the pom.xml
 discard adbc6d0  - Fixed a bug in the processing of real responses.
 discard 47c58b2  - Extended the size of the byte-offset to allow 5 digit 
offsets.
 discard 5cb40cd  [PLC4X-75] - Fixing dependency to the wrap url-handler
omit 1f03e11  [plc4j-scraper] Implementation of JMX.
 add 826fc1d  [PLC4X-75] - Fixing dependency to the wrap url-handler
 add fac1b5d  Merge pull request #42 from ANierbeck/develop
 add 6e78786  - Extended the size of the byte-offset 

[incubator-plc4x] branch develop updated (8d190c2 -> a67f311)

2018-12-11 Thread jfeinauer
This is an automated email from the ASF dual-hosted git repository.

jfeinauer pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.


from 8d190c2  Adjusted the content of the failure-email
 add b054c6e  [OPM] Improved logging, better Exception handling.
 add 2cb21bc  Added some Logging for Diagnostics in PlcDriverManager.
 new a67f311  [OPM,POOL] Added better defaults for Scrapers 
PlcPooledDriverManager.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/plc4x/java/PlcDriverManager.java|  7 +
 .../java/utils/connectionpool/PoolKeyFactory.java  |  1 +
 .../org/apache/plc4x/java/scraper/Scraper.java | 22 --
 .../org/apache/plc4x/java/scraper/ScraperTask.java |  1 +
 .../java/scraper/config/ScraperConfiguration.java  | 25 ++--
 .../config/ScraperConfigurationException.java} | 34 +-
 6 files changed, 59 insertions(+), 31 deletions(-)
 copy 
plc4j/{protocols/driver-bases/test/src/main/java/org/apache/plc4x/java/mock/MockField.java
 => 
utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/ScraperConfigurationException.java}
 (53%)



[incubator-plc4x] 01/01: [OPM, POOL] Added better defaults for Scrapers PlcPooledDriverManager.

2018-12-11 Thread jfeinauer
This is an automated email from the ASF dual-hosted git repository.

jfeinauer pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit a67f31160276782f8081563287948cfbf2ae2d6e
Author: Julian Feinauer 
AuthorDate: Tue Dec 11 09:36:15 2018 +0100

[OPM,POOL] Added better defaults for Scrapers PlcPooledDriverManager.
---
 .../java/utils/connectionpool/PoolKeyFactory.java|  1 +
 .../java/org/apache/plc4x/java/scraper/Scraper.java  | 20 +++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git 
a/plc4j/utils/connection-pool/src/main/java/org/apache/plc4x/java/utils/connectionpool/PoolKeyFactory.java
 
b/plc4j/utils/connection-pool/src/main/java/org/apache/plc4x/java/utils/connectionpool/PoolKeyFactory.java
index e5d73c1..f72bdce 100644
--- 
a/plc4j/utils/connection-pool/src/main/java/org/apache/plc4x/java/utils/connectionpool/PoolKeyFactory.java
+++ 
b/plc4j/utils/connection-pool/src/main/java/org/apache/plc4x/java/utils/connectionpool/PoolKeyFactory.java
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
 
 public class PoolKeyFactory {
 
+// TODO 11.12.18 jf: add a property to the drivers to keep this generic
 public PoolKey getPoolKey(String url, PlcAuthentication plcAuthentication) 
throws PlcConnectionException {
 Objects.requireNonNull(url);
 URI connectionUri;
diff --git 
a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java 
b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java
index a478272..725e58e 100644
--- 
a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java
+++ 
b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java
@@ -25,7 +25,10 @@ import org.apache.commons.lang3.Validate;
 import org.apache.commons.lang3.concurrent.BasicThreadFactory;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
 import org.apache.plc4x.java.PlcDriverManager;
+import org.apache.plc4x.java.api.PlcConnection;
 import org.apache.plc4x.java.scraper.config.ScraperConfiguration;
 import org.apache.plc4x.java.scraper.util.PercentageAboveThreshold;
 import org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager;
@@ -71,7 +74,22 @@ public class Scraper {
  * @param resultHandler
  */
 public Scraper(ScraperConfiguration config, ResultHandler resultHandler) {
-this(resultHandler, new PooledPlcDriverManager(), config.getJobs());
+this(resultHandler, createPooledDriverManager(), config.getJobs());
+}
+
+/**
+ * Min Idle per Key is set to 1 for situations where the network is broken.
+ * Then, on reconnect we can fail all getConnection calls (in the 
ScraperTask) fast until
+ * (in the background) the idle connection is created and the 
getConnection call returns fast.
+ */
+private static PooledPlcDriverManager createPooledDriverManager() {
+return new PooledPlcDriverManager(pooledPlcConnectionFactory -> {
+GenericKeyedObjectPoolConfig poolConfig = new 
GenericKeyedObjectPoolConfig<>();
+poolConfig.setMinIdlePerKey(1);  // This should avoid problems 
with long running connect attempts??
+poolConfig.setTestOnBorrow(true);
+poolConfig.setTestOnReturn(true);
+return new GenericKeyedObjectPool<>(pooledPlcConnectionFactory, 
poolConfig);
+});
 }
 
 /**