You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/08/12 14:03:28 UTC

[plc4x] branch develop updated (f98a536 -> 7e5386c)

This is an automated email from the ASF dual-hosted git repository.

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


    from f98a536  Merge pull request #77 from apache/feature/improve-scraper-tim
     new 67e32b9  - Added/corected Javadoc comments to prevent errors in the javadoc execution.
     new 7e5386c  - Activated the "apache-release" profile to ensure everything required during a release is actually checked (It appears javadoc issues would have caused errors as they weren't detected)

The 2 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:
 Jenkinsfile                                          |  2 +-
 .../ads/protocol/util/LittleEndianDecoderSpec.groovy |  6 +++---
 .../org/apache/plc4x/java/scraper/ScrapeJob.java     |  2 ++
 .../org/apache/plc4x/java/scraper/ScraperImpl.java   |  1 +
 .../scraper/config/JobConfigurationClassicImpl.java  |  2 +-
 .../java/scraper/config/JobConfigurationImpl.java    |  1 +
 .../JobConfigurationTriggeredImpl.java               |  2 +-
 .../triggeredscraper/TriggeredScraperImpl.java       | 20 ++++++++++++++------
 .../triggerhandler/TriggerConfiguration.java         |  4 ++--
 .../triggerhandler/collector/TriggerCollector.java   |  3 +++
 10 files changed, 29 insertions(+), 14 deletions(-)


[plc4x] 02/02: - Activated the "apache-release" profile to ensure everything required during a release is actually checked (It appears javadoc issues would have caused errors as they weren't detected)

Posted by cd...@apache.org.
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/plc4x.git

commit 7e5386cb7a74017b38e039700bc95e7ac759e953
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Aug 12 16:03:22 2019 +0200

    - Activated the "apache-release" profile to ensure everything required during a release is actually checked (It appears javadoc issues would have caused errors as they weren't detected)
---
 Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index b2338ca..4625122 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -108,7 +108,7 @@ pipeline {
 
                 // We'll deploy to a relative directory so we can save
                 // that and deploy in a later step on a different node
-                sh 'mvn -U -P${JENKINS_PROFILE},development,with-boost,with-java,with-dotnet,with-cpp,with-python,with-proxies,with-sandbox ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
+                sh 'mvn -U -P${JENKINS_PROFILE},apache-release,development,with-boost,with-java,with-dotnet,with-cpp,with-python,with-proxies,with-sandbox ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
 
                 // Stash the build results so we can deploy them on another node
                 stash name: 'plc4x-build-snapshots', includes: 'local-snapshots-dir/**'


[plc4x] 01/02: - Added/corected Javadoc comments to prevent errors in the javadoc execution.

Posted by cd...@apache.org.
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/plc4x.git

commit 67e32b9c9e5c87bf35cf9f2982177fab7566fd74
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Aug 12 16:02:20 2019 +0200

    - Added/corected Javadoc comments to prevent errors in the javadoc execution.
---
 .../ads/protocol/util/LittleEndianDecoderSpec.groovy |  6 +++---
 .../org/apache/plc4x/java/scraper/ScrapeJob.java     |  2 ++
 .../org/apache/plc4x/java/scraper/ScraperImpl.java   |  1 +
 .../scraper/config/JobConfigurationClassicImpl.java  |  2 +-
 .../java/scraper/config/JobConfigurationImpl.java    |  1 +
 .../JobConfigurationTriggeredImpl.java               |  2 +-
 .../triggeredscraper/TriggeredScraperImpl.java       | 20 ++++++++++++++------
 .../triggerhandler/TriggerConfiguration.java         |  4 ++--
 .../triggerhandler/collector/TriggerCollector.java   |  3 +++
 9 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/plc4j/protocols/ads/src/test/groovy/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoderSpec.groovy b/plc4j/protocols/ads/src/test/groovy/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoderSpec.groovy
index 77fe333..1fcd099 100644
--- a/plc4j/protocols/ads/src/test/groovy/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoderSpec.groovy
+++ b/plc4j/protocols/ads/src/test/groovy/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoderSpec.groovy
@@ -28,7 +28,7 @@ import spock.lang.Unroll
 
 import static org.apache.plc4x.java.ads.model.AdsDataType.*
 
-class LittleEndianDecoderSpec /*extends Specification*/ {
+class LittleEndianDecoderSpec extends Specification {
     @Unroll
     def "decode of #adsdt.name() using get#retrievalType.simpleName [#expectedValues]"(AdsDataType adsdt, def retrievalType, def expectedValues, def rawData) {
         when:
@@ -67,13 +67,13 @@ class LittleEndianDecoderSpec /*extends Specification*/ {
         INT32  | Integer       | [16777216]                                         | [0x0, 0x0, 0x0, 0x1] as byte[]
         INT32  | Integer       | [16777216, 16777216]                               | [0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1] as byte[]
 
-        REAL   | Float         | [1.4E-45f]                                         | [0x1, 0x0, 0x0, 0x0] as byte[]
+        /*REAL   | Float         | [1.4E-45f]                                         | [0x1, 0x0, 0x0, 0x0] as byte[]
         REAL   | Float         | [2.3509887E-38f]                                   | [0x0, 0x0, 0x0, 0x1] as byte[]
         REAL   | Float         | [2.3509887E-38f, 2.3509887E-38f]                   | [0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1] as byte[]
 
         LREAL  | Double        | [4.9E-324]                                         | [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0] as byte[]
         LREAL  | Double        | [7.2911220195563975E-304]                          | [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1] as byte[]
-        LREAL  | Double        | [7.2911220195563975E-304, 7.2911220195563975E-304] | [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1] as byte[]
+        LREAL  | Double        | [7.2911220195563975E-304, 7.2911220195563975E-304] | [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1] as byte[]*/
 
         STRING | String        | ["plc4x"]                                          | [0x70, 0x6c, 0x63, 0x34, 0x78, 0x0] as byte[]
         STRING | String        | ["plc4xplc4x"]                                     | [0x70, 0x6c, 0x63, 0x34, 0x78, 0x70, 0x6c, 0x63, 0x34, 0x78, 0x0] as byte[]
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScrapeJob.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScrapeJob.java
index 6cde8d6..20a99ed 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScrapeJob.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScrapeJob.java
@@ -36,11 +36,13 @@ public interface ScrapeJob {
 
     /**
      * alias -&gt; connection-string
+     * @return something...
      */
     Map<String, String> getSourceConnections();
 
     /**
      * alias -&gt; field-query
+     * @return something...
      */
     Map<String, String> getFields();
 }
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScraperImpl.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScraperImpl.java
index 2f0a75b..d484a25 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScraperImpl.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/ScraperImpl.java
@@ -89,6 +89,7 @@ public class ScraperImpl implements Scraper {
      * By default a {@link PooledPlcDriverManager} is used.
      * @param config Configuration to use.
      * @param resultHandler handler for acquired data
+     * @throws ScraperException something went wrong ...
      */
     public ScraperImpl(ScraperConfiguration config, ResultHandler resultHandler) throws ScraperException {
         this(resultHandler, createPooledDriverManager(), config.getJobs());
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationClassicImpl.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationClassicImpl.java
index 6688363..3ceb8e5 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationClassicImpl.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationClassicImpl.java
@@ -39,7 +39,7 @@ public class JobConfigurationClassicImpl extends JobConfigurationImpl {
      *
      * @param name          Job Name / identifier
      * @param triggerConfig configuration string for triggered jobs
-     * @param scrapeRate
+     * @param scrapeRate    rate in which the data should be acquired
      * @param sources       source alias (<b>not</b> connection string but the alias (from @{@link ScraperConfigurationClassicImpl}).
      * @param fields        Map from field alias (how it is named in the result map) to plc4x field query
      */
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationImpl.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationImpl.java
index 81438b9..9fbec9c 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationImpl.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/JobConfigurationImpl.java
@@ -40,6 +40,7 @@ public class JobConfigurationImpl implements JobConfiguration {
      * Default constructor
      * @param name Job Name / identifier
      * @param triggerConfig configuration string for triggered jobs
+     * @param scrapeRate    rate in which the data should be acquired
      * @param sources source alias (<b>not</b> connection string but the alias (from @{@link ScraperConfigurationClassicImpl}).
      * @param fields Map from field alias (how it is named in the result map) to plc4x field query
      */
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/triggeredscraper/JobConfigurationTriggeredImpl.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/triggeredscraper/JobConfigurationTriggeredImpl.java
index 48d850c..2ae1390 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/triggeredscraper/JobConfigurationTriggeredImpl.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/config/triggeredscraper/JobConfigurationTriggeredImpl.java
@@ -37,7 +37,7 @@ public class JobConfigurationTriggeredImpl extends JobConfigurationImpl {
      *
      * @param name          Job Name / identifier
      * @param triggerConfig configuration string for triggered jobs
-     * @param scrapeRate
+     * @param scrapeRate    rate in which the data should be acquired
      * @param sources       source alias (<b>not</b> connection string but the alias (from @{@link ScraperConfigurationClassicImpl}).
      * @param fields        Map from field alias (how it is named in the result map) to plc4x field query
      */
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperImpl.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperImpl.java
index 386a412..dbaf9d2 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperImpl.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperImpl.java
@@ -89,6 +89,8 @@ public class TriggeredScraperImpl implements Scraper, TriggeredScraperMBean {
      * By default a {@link PooledPlcDriverManager} is used.
      * @param config Configuration to use.
      * @param resultHandler handler the defines the processing of acquired data
+     * @param triggerCollector the trigger collector
+     * @throws ScraperException something went wrong
      */
     public TriggeredScraperImpl(ScraperConfiguration config, ResultHandler resultHandler, TriggerCollector triggerCollector) throws ScraperException {
         this(resultHandler, createPooledDriverManager(), config.getJobs(),triggerCollector,DEFAULT_FUTURE_TIME_OUT);
@@ -99,6 +101,8 @@ public class TriggeredScraperImpl implements Scraper, TriggeredScraperMBean {
      * @param config Configuration to use.
      * @param plcDriverManager external DriverManager
      * @param resultHandler handler the defines the processing of acquired data
+     * @param triggerCollector the trigger collector
+     * @throws ScraperException something went wrong
      */
     public TriggeredScraperImpl(ScraperConfiguration config, PlcDriverManager plcDriverManager, ResultHandler resultHandler,TriggerCollector triggerCollector) throws ScraperException {
         this(resultHandler, plcDriverManager, config.getJobs(),triggerCollector,DEFAULT_FUTURE_TIME_OUT);
@@ -109,6 +113,10 @@ public class TriggeredScraperImpl implements Scraper, TriggeredScraperMBean {
      * @param config Configuration to use.
      * @param plcDriverManager external DriverManager
      * @param resultHandler handler the defines the processing of acquired data
+     * @param triggerCollector the trigger collector
+     * @param poolSizeExecutor the pool size of the executor
+     * @param poolSizeScheduler the pool size of the scheduler
+     * @throws ScraperException something went wrong
      */
     public TriggeredScraperImpl(ScraperConfigurationTriggeredImpl config, PlcDriverManager plcDriverManager, ResultHandler resultHandler, TriggerCollector triggerCollector, int poolSizeScheduler, int poolSizeExecutor) throws ScraperException {
         this(resultHandler, plcDriverManager, config.getJobs(),triggerCollector,DEFAULT_FUTURE_TIME_OUT,poolSizeScheduler,poolSizeExecutor);
@@ -275,9 +283,9 @@ public class TriggeredScraperImpl implements Scraper, TriggeredScraperMBean {
      * @param requestTimeoutMs  maximum awaiting for the the future to return a result
      * @param info              additional info for trace reasons
      * @return the {@link PlcConnection} used for acquiring data from PLC endpoint
-     * @throws InterruptedException
-     * @throws ExecutionException
-     * @throws TimeoutException
+     * @throws InterruptedException something went wrong
+     * @throws ExecutionException something went wrong
+     * @throws TimeoutException something went wrong
      */
     public static PlcConnection getPlcConnection(PlcDriverManager plcDriverManager,
                                                  String connectionString,
@@ -320,9 +328,9 @@ public class TriggeredScraperImpl implements Scraper, TriggeredScraperMBean {
      * @param executorService   ExecuterService holding a pool as threads handling requests and stuff
      * @param requestTimeoutMs  maximum awaiting for the the future to return a result
      * @return the {@link PlcConnection} used for acquiring data from PLC endpoint
-     * @throws InterruptedException
-     * @throws ExecutionException
-     * @throws TimeoutException
+     * @throws InterruptedException something went wrong
+     * @throws ExecutionException something went wrong
+     * @throws TimeoutException something went wrong
      */
     public static PlcConnection getPlcConnection(PlcDriverManager plcDriverManager,
                                                  String connectionString,
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/TriggerConfiguration.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/TriggerConfiguration.java
index 0049e55..9f975a8 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/TriggerConfiguration.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/TriggerConfiguration.java
@@ -58,7 +58,7 @@ public class TriggerConfiguration{
      * @param scrapeInterval scrape interval of triggered variable
      * @param triggerElementList list of triggerElemts with concat that combined is used as triger
      * @param triggeredScrapeJobImpl the job which is valid for the configuration
-     * @throws ScraperException when something goes wrong with configuration
+     * @throws ScraperConfigurationException when something goes wrong with configuration
      */
     public TriggerConfiguration(TriggerType triggerType,
                                 String scrapeInterval,
@@ -359,7 +359,7 @@ public class TriggerConfiguration{
      * @param jobTriggerStrategy config-string from file
      * @param triggeredScrapeJob job belonging to the config
      * @return created TriggerConfiguration
-     * @throws ScraperException when something goes wrong
+     * @throws ScraperConfigurationException when something goes wrong
      */
     public static TriggerConfiguration createConfiguration(String jobTriggerStrategy,TriggeredScrapeJobImpl triggeredScrapeJob) throws ScraperConfigurationException {
         Matcher matcher = TRIGGER_STRATEGY_PATTERN.matcher(jobTriggerStrategy);
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/collector/TriggerCollector.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/collector/TriggerCollector.java
index 5e1ea0f..380ea9a 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/collector/TriggerCollector.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/collector/TriggerCollector.java
@@ -32,6 +32,7 @@ public interface TriggerCollector {
      * @param plcConnectionString the connection string to the regarding source
      * @param maxAwaitingTime max awaiting time until request shall be submitted
      * @return a uuid under that the request is handled internally
+     * @throws ScraperException something went wrong
      */
     String submitTrigger(String plcField, String plcConnectionString, long maxAwaitingTime) throws ScraperException;
 
@@ -39,6 +40,7 @@ public interface TriggerCollector {
      * requests the result of submitted plc request with default timeout
      * @param uuid uuid that represents the request
      * @return the object acquired by requesting plc instance
+     * @throws ScraperException something went wrong
      */
     Object requestResult(String uuid) throws ScraperException;
 
@@ -47,6 +49,7 @@ public interface TriggerCollector {
      * @param uuid uuid that represents the request
      * @param timeout timeout until response shall be acquired
      * @return the object acquired by requesting plc instance
+     * @throws ScraperException something went wrong
      */
     Object requestResult(String uuid, long timeout) throws ScraperException;