You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "joewitt (via GitHub)" <gi...@apache.org> on 2024/07/07 01:27:49 UTC

[PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

joewitt opened a new pull request, #9059:
URL: https://github.com/apache/nifi/pull/9059

   …cleaned up a few dead classes and removed refactored left behind code in flowfilerepo
   
   removed nifi-socket-utils and an abstract class with no usage.  Moved remaining usage of socket utils to only place usage remains
   
   <!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
   <!-- contributor license agreements.  See the NOTICE file distributed with -->
   <!-- this work for additional information regarding copyright ownership. -->
   <!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
   <!-- (the "License"); you may not use this file except in compliance with -->
   <!-- the License.  You may obtain a copy of the License at -->
   <!--     http://www.apache.org/licenses/LICENSE-2.0 -->
   <!-- Unless required by applicable law or agreed to in writing, software -->
   <!-- distributed under the License is distributed on an "AS IS" BASIS, -->
   <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
   <!-- See the License for the specific language governing permissions and -->
   <!-- limitations under the License. -->
   
   # Summary
   
   [NIFI-13526](https://issues.apache.org/jira/browse/NIFI-13526)
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [ ] Pull Request based on current revision of the `main` branch
   - [ ] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
     - [ ] JDK 21
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on code in PR #9059:
URL: https://github.com/apache/nifi/pull/9059#discussion_r1667601674


##########
nifi-framework-api/src/main/java/org/apache/nifi/cluster/ConnectionState.java:
##########
@@ -24,41 +24,6 @@ public enum ConnectionState {
      */
     NOT_CLUSTERED,
 
-    /**
-     * Instance is in the process of connecting to the cluster
-     */
-    CONNECTING,
-
-    /**
-     * Instance is connected to the cluster
-     */
-    CONNECTED,
-
-    /**
-     * Instance is in the process of disconnecting from the cluster
-     */
-    DISCONNECTING,
-
-    /**
-     * Instance is disconnected from the cluster
-     */
-    DISCONNECTED,
-
-    /**
-     * Instance is offloading
-     */
-    OFFLOADING,
-
-    /**
-     * Instances has completed offloading
-     */
-    OFFLOADED,
-
-    /**
-     * Instance has been removed from the cluster
-     */
-    REMOVED,
-

Review Comment:
   There is now a NodeConnectionState that has those.  These 'ConnectionState' entries look defunct at least from code scanning.     How are you finding they are valid?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on code in PR #9059:
URL: https://github.com/apache/nifi/pull/9059#discussion_r1667601716


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/BundleUpdateStrategy.java:
##########
@@ -22,11 +22,7 @@ public enum BundleUpdateStrategy {
     /**
      * If a proposed flow has a different bundle than the current flow, the bundle is not updated
      */
-    IGNORE_BUNDLE,

Review Comment:
   Can you share more about how this would be valid but never referenced?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #9059:
URL: https://github.com/apache/nifi/pull/9059#discussion_r1669052624


##########
nifi-framework-api/src/main/java/org/apache/nifi/cluster/ConnectionState.java:
##########
@@ -24,41 +24,6 @@ public enum ConnectionState {
      */
     NOT_CLUSTERED,
 
-    /**
-     * Instance is in the process of connecting to the cluster
-     */
-    CONNECTING,
-
-    /**
-     * Instance is connected to the cluster
-     */
-    CONNECTED,
-
-    /**
-     * Instance is in the process of disconnecting from the cluster
-     */
-    DISCONNECTING,
-
-    /**
-     * Instance is disconnected from the cluster
-     */
-    DISCONNECTED,
-
-    /**
-     * Instance is offloading
-     */
-    OFFLOADING,
-
-    /**
-     * Instances has completed offloading
-     */
-    OFFLOADED,
-
-    /**
-     * Instance has been removed from the cluster
-     */
-    REMOVED,
-

Review Comment:
   Yes, in this case, the `StandardClusterDetailsFactory` reads the `NodeConnectionState` and then converts that string name to this `ConnectionState` value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #9059:
URL: https://github.com/apache/nifi/pull/9059#discussion_r1669055638


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/BundleUpdateStrategy.java:
##########
@@ -22,11 +22,7 @@ public enum BundleUpdateStrategy {
     /**
      * If a proposed flow has a different bundle than the current flow, the bundle is not updated
      */
-    IGNORE_BUNDLE,

Review Comment:
   On closer review, this appears to be limited to explicit usage in method arguments, so it seems like it could be removed. However, as a framework-core-api element, it may be better considered in the context of other framework changes, keeping it for the moment seems best.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory closed pull request #9059: NIFI-13526 searched for mostly unused statics, unused variables, and …
URL: https://github.com/apache/nifi/pull/9059


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #9059:
URL: https://github.com/apache/nifi/pull/9059#issuecomment-2212183863

   Could not find any apparent usage of this class https://github.com/apache/nifi/pull/9059/files#diff-421025e1497a4c2a1e9580f75bb9fa5ea41de556e1c31e332e8eab61143e22a3
   
   CuratorNode... seemed dead. But I am not certain


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #9059:
URL: https://github.com/apache/nifi/pull/9059#discussion_r1667599755


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/BundleUpdateStrategy.java:
##########
@@ -22,11 +22,7 @@ public enum BundleUpdateStrategy {
     /**
      * If a proposed flow has a different bundle than the current flow, the bundle is not updated
      */
-    IGNORE_BUNDLE,

Review Comment:
   This could be valid in some circumstances and should be reverted.



##########
nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/entity/ConfigureDetailsEntity.java:
##########
@@ -20,8 +20,6 @@
  * Enumeration of Action Configure Details properties stored as Entity objects
  */
 public enum ConfigureDetailsEntity implements EntityProperty {
-    ACTION("action"),
-

Review Comment:
   This is valid and should be reverted.



##########
nifi-extension-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/CommitPreference.java:
##########
@@ -19,6 +19,5 @@
 
 public enum CommitPreference {
     FORCE_COMMIT,
-    PREVENT_COMMIT,
-    NO_PREFERENCE;
+    PREVENT_COMMIT;

Review Comment:
   It looks like this could be valid, and should be reverted.



##########
nifi-framework-api/src/main/java/org/apache/nifi/cluster/ConnectionState.java:
##########
@@ -24,41 +24,6 @@ public enum ConnectionState {
      */
     NOT_CLUSTERED,
 
-    /**
-     * Instance is in the process of connecting to the cluster
-     */
-    CONNECTING,
-
-    /**
-     * Instance is connected to the cluster
-     */
-    CONNECTED,
-
-    /**
-     * Instance is in the process of disconnecting from the cluster
-     */
-    DISCONNECTING,
-
-    /**
-     * Instance is disconnected from the cluster
-     */
-    DISCONNECTED,
-
-    /**
-     * Instance is offloading
-     */
-    OFFLOADING,
-
-    /**
-     * Instances has completed offloading
-     */
-    OFFLOADED,
-
-    /**
-     * Instance has been removed from the cluster
-     */
-    REMOVED,
-

Review Comment:
   This looks valid and seems like it should be reverted.



##########
nifi-extension-bundles/nifi-pgp-bundle/nifi-pgp-processors/src/main/java/org/apache/nifi/processors/pgp/attributes/CompressionAlgorithm.java:
##########
@@ -26,8 +26,6 @@ public enum CompressionAlgorithm {
 
     ZIP(CompressionAlgorithmTags.ZIP),
 
-    ZLIB(CompressionAlgorithmTags.ZLIB),
-

Review Comment:
   This is a valid option and the change should be reverted.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-13526 searched for mostly unused statics, unused variables, and … [nifi]

Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #9059:
URL: https://github.com/apache/nifi/pull/9059#issuecomment-2212338192

   Went ahead and pushed a change restoring all the enums. Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org