Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-413 [Umbrella] Fix checkstyle warnings
  3. RATIS-694

Fix checkstyle violations in ratis-metrics

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.5.0
    • metrics
    • None

    Description

      Checkstyle found 78 item(s) in 30 file(s)

      BaseStateMachine.java : 5 item(s)
      Variable 'server' must be private and have accessor methods. (49:49) [VisibilityModifierCheck]
      Variable 'groupId' must be private and have accessor methods. (50:34) [VisibilityModifierCheck]
      Variable 'lifeCycle' must be private and have accessor methods. (51:29) [VisibilityModifierCheck]
      'server' hides a field. (67:37) [HiddenFieldCheck]
      'groupId' hides a field. (67:57) [HiddenFieldCheck]

      BufferedChannelBase.java : 1 item(s)
      Variable 'fileChannel' must be private and have accessor methods. (25:31) [VisibilityModifierCheck]

      LeaderElection.java : 3 item(s)
      Variable 'result' must be private and have accessor methods. (70:18) [VisibilityModifierCheck]
      Variable 'term' must be private and have accessor methods. (71:16) [VisibilityModifierCheck]
      switch without "default" clause. (208:0) [MissingSwitchDefaultCheck]

      LeaderState.java : 9 item(s)
      Variable 'type' must be private and have accessor methods. (70:16) [VisibilityModifierCheck]
      Variable 'newTerm' must be private and have accessor methods. (71:16) [VisibilityModifierCheck]
      Variable 'handler' must be private and have accessor methods. (72:20) [VisibilityModifierCheck]
      Definition of 'equals()' without corresponding definition of 'hashCode()'. (84:5) [EqualsHashCodeCheck]
      'for' construct must use '{}'s. (129:0) [NeedBracesCheck]
      Empty statement. (129:52) [EmptyStatementCheck]
      Name 'UPDATE_COMMIT_EVENT' must match pattern '^[a-z][a-zA-Z0-9]*$'. (178:34) [MemberNameCheck]
      Name 'CHECK_STAGING_EVENT' must match pattern '^[a-z][a-zA-Z0-9]*$'. (180:34) [MemberNameCheck]
      'stagingState' hides a field. (296:31) [HiddenFieldCheck]

      LogAppender.java : 5 item(s)
      Variable 'server' must be private and have accessor methods. (122:34) [VisibilityModifierCheck]
      Variable 'raftLog' must be private and have accessor methods. (124:27) [VisibilityModifierCheck]
      Variable 'follower' must be private and have accessor methods. (125:32) [VisibilityModifierCheck]
      Variable 'halfMinTimeoutMs' must be private and have accessor methods. (129:24) [VisibilityModifierCheck]
      switch without "default" clause. (483:0) [MissingSwitchDefaultCheck]

      LogSegment.java : 1 item(s)
      Class LogSegment should be declared as final. (53:0) [FinalClassCheck]

      MemoryRaftLog.java : 1 item(s)
      'entries' hides a field. (161:68) [HiddenFieldCheck]

      MetaFile.java : 2 item(s)
      'term' hides a field. (88:23) [HiddenFieldCheck]
      'votedFor' hides a field. (88:36) [HiddenFieldCheck]

      PendingRequests.java : 2 item(s)
      Line is longer than 120 characters (found 123). (112:0) [LineLengthCheck]
      Line is longer than 120 characters (found 122). (201:0) [LineLengthCheck]

      RaftConfiguration.java : 2 item(s)
      Class RaftConfiguration should be declared as final. (36:0) [FinalClassCheck]
      Class Builder should be declared as final. (43:0) [FinalClassCheck]

      RaftLog.java : 1 item(s)
      Line is longer than 120 characters (found 131). (321:0) [LineLengthCheck]

      RaftServer.java : 1 item(s)
      Line is longer than 120 characters (found 128). (79:0) [LineLengthCheck]

      RaftServerConstants.java : 1 item(s)
      interfaces should describe a type and hence have methods. (22:0) [InterfaceIsTypeCheck]

      RaftServerImpl.java : 5 item(s)
      Line is longer than 120 characters (found 136). (82:0) [LineLengthCheck]
      'state' hides a field. (124:19) [HiddenFieldCheck]
      'stateMachine' hides a field. (545:24) [HiddenFieldCheck]
      More than 7 parameters (found 8). (885:54) [ParameterNumberCheck]
      'stateMachine' hides a field. (1,250:24) [HiddenFieldCheck]

      RaftServerProxy.java : 2 item(s)
      Name '_1' must match pattern '^[a-z][a-zA-Z0-9]*$'. (385:24) [ParameterNameCheck]
      Line is longer than 120 characters (found 123). (397:0) [LineLengthCheck]

      RaftServerRpc.java : 1 item(s)
      'server' hides a field. (45:35) [HiddenFieldCheck]

      RaftStorage.java : 1 item(s)
      'metaFile' hides a field. (89:14) [HiddenFieldCheck]

      RaftStorageDirectory.java : 3 item(s)
      Variable 'startIndex' must be private and have accessor methods. (66:23) [VisibilityModifierCheck]
      Variable 'endIndex' must be private and have accessor methods. (67:23) [VisibilityModifierCheck]
      'if' construct must use '{}'s. (355:0) [NeedBracesCheck]

      RatisMetrics.java : 5 item(s)
      Utility classes should not have a public or default constructor. (30:1) [HideUtilityClassConstructorCheck]
      'static' modifier out of order with the JLS suggestions. (31:16) [ModifierOrderCheck]
      'static' modifier out of order with the JLS suggestions. (32:16) [ModifierOrderCheck]
      'static' modifier out of order with the JLS suggestions. (33:16) [ModifierOrderCheck]
      Variable 'metricsReporting' must be private and have accessor methods. (41:27) [VisibilityModifierCheck]

      SegmentedRaftLogCache.java : 9 item(s)
      Variable 'startIndex' must be private and have accessor methods. (58:16) [VisibilityModifierCheck]
      Variable 'endIndex' must be private and have accessor methods. (59:16) [VisibilityModifierCheck]
      Variable 'isOpen' must be private and have accessor methods. (60:19) [VisibilityModifierCheck]
      Variable 'targetLength' must be private and have accessor methods. (61:16) [VisibilityModifierCheck]
      Variable 'newEndIndex' must be private and have accessor methods. (62:16) [VisibilityModifierCheck]
      Variable 'toTruncate' must be private and have accessor methods. (81:27) [VisibilityModifierCheck]
      Variable 'toDelete' must be private and have accessor methods. (82:29) [VisibilityModifierCheck]
      Variable 'arrayIndex' must be private and have accessor methods. (490:15) [VisibilityModifierCheck]
      Variable 'truncateIndex' must be private and have accessor methods. (491:16) [VisibilityModifierCheck]

      SegmentedRaftLogOutputStream.java : 1 item(s)
      Name 'fill' must match pattern '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. (40:35) [ConstantNameCheck]

      SegmentedRaftLogReader.java : 4 item(s)
      'if' construct must use '{}'s. (68:0) [NeedBracesCheck]
      'if' construct must use '{}'s. (76:0) [NeedBracesCheck]
      'if' construct must use '{}'s. (84:0) [NeedBracesCheck]
      Name 'maxOpSize' must match pattern '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. (129:28) [ConstantNameCheck]

      ServerImplUtils.java : 1 item(s)
      Utility classes should not have a public or default constructor. (34:1) [HideUtilityClassConstructorCheck]

      ServerProtoUtils.java : 2 item(s)
      More than 7 parameters (found 9). (356:38) [ParameterNumberCheck]
      More than 7 parameters (found 9). (403:36) [ParameterNumberCheck]

      ServerState.java : 3 item(s)
      'leaderId' hides a field. (291:38) [HiddenFieldCheck]
      'currentTerm' hides a field. (367:55) [HiddenFieldCheck]
      'currentTerm' hides a field. (375:58) [HiddenFieldCheck]

      SimpleStateMachineStorage.java : 1 item(s)
      'raftStorage' hides a field. (63:32) [HiddenFieldCheck]

      StateMachine.java : 1 item(s)
      Unused import - org.apache.ratis.server.RaftServerConfigKeys. (25:8) [UnusedImportsCheck]

      StateMachineUpdater.java : 1 item(s)
      'appliedIndex' hides a field. (256:18) [HiddenFieldCheck]

      TransactionContext.java : 1 item(s)
      Unused import - java.util.Collection. (30:8) [UnusedImportsCheck]

      TransactionContextImpl.java : 3 item(s)
      'stateMachineContext' hides a field. (123:59) [HiddenFieldCheck]
      'smLogEntryProto' hides a field. (142:84) [HiddenFieldCheck]
      'shouldCommit' hides a field. (159:53) [HiddenFieldCheck]

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dineshchitlangia Dinesh Chitlangia
            dineshchitlangia Dinesh Chitlangia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment