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

Fix checkstyle violations in ratis-logservice

    XMLWordPrintableJSON

Details

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

    Description

      Checkstyle found 83 item(s) in 22 file(s)

      • ArchiveHdfsLogReader.java : 3 item(s)
        • Unused import - java.io.File. (21:8) [UnusedImportsCheck]
        • Unused import - java.nio.Buffer. (24:8) [UnusedImportsCheck]
        • Unused import - org.apache.ratis.logservice.api.LogName. (39:8) [UnusedImportsCheck]
      • ArchiveHdfsLogWriter.java : 1 item(s)
        • Unused import - org.apache.ratis.util.LogUtils. (32:8) [UnusedImportsCheck]
      • ArchivedLogStreamImpl.java : 3 item(s)
        • Variable 'name' must be private and have accessor methods. (45:11) [VisibilityModifierCheck]
        • Variable 'config' must be private and have accessor methods. (49:27) [VisibilityModifierCheck]
        • Variable 'state' must be private and have accessor methods. (53:9) [VisibilityModifierCheck]
      • CommandFactory.java : 1 item(s)
        • Class CommandFactory should be declared as final. (35:0) [FinalClassCheck]
      • Constants.java : 1 item(s)
        • Utility classes should not have a public or default constructor. (25:1) [HideUtilityClassConstructorCheck]
      • LogMessage.java : 1 item(s)
        • Variable 'logName' must be private and have accessor methods. (27:21) [VisibilityModifierCheck]
      • LogName.java : 1 item(s)
        • Class LogName should be declared as final. (31:0) [FinalClassCheck]
      • LogReaderImpl.java : 2 item(s)
        • Variable 'currentRecordId' must be private and have accessor methods. (61:8) [VisibilityModifierCheck]
        • File contains tab characters (this is the first instance). (126:1) [FileTabCharacterCheck]
      • LogServer.java : 2 item(s)
        • Variable 'peer' must be private and have accessor methods. (192:18) [VisibilityModifierCheck]
        • Redundant 'public' modifier. (193:9) [RedundantModifierCheck]
      • LogServiceClient.java : 3 item(s)
        • 'private' modifier out of order with the JLS suggestions. (57:11) [ModifierOrderCheck]
        • 'private' modifier out of order with the JLS suggestions. (58:11) [ModifierOrderCheck]
        • 'config' hides a field. (269:68) [HiddenFieldCheck]
      • LogServiceMetricsRegistry.java : 2 item(s)
        • Utility classes should not have a public or default constructor. (28:1) [HideUtilityClassConstructorCheck]
        • Variable 'metricsReporting' must be private and have accessor methods. (35:27) [VisibilityModifierCheck]
      • LogServiceShell.java : 1 item(s)
        • Name 'LOG' must match pattern '^[a-z][a-zA-Z0-9]*$'. (46:25) [StaticVariableNameCheck]
      • LogServiceShellOpts.java : 1 item(s)
        • Variable 'metaQuorum' must be private and have accessor methods. (24:17) [VisibilityModifierCheck]
      • LogServiceUtils.java : 1 item(s)
        • Utility classes should not have a public or default constructor. (32:1) [HideUtilityClassConstructorCheck]
      • LogStateMachine.java : 13 item(s)
        • 'state' hides a field. (185:19) [HiddenFieldCheck]
        • Redundant 'final' modifier. (199:9) [RedundantModifierCheck]
        • Redundant 'final' modifier. (206:9) [RedundantModifierCheck]
        • Redundant 'final' modifier. (207:9) [RedundantModifierCheck]
        • Redundant 'final' modifier. (236:9) [RedundantModifierCheck]
        • Redundant 'final' modifier. (237:9) [RedundantModifierCheck]
        • 'archivalInfo' hides a field. (334:9) [HiddenFieldCheck]
        • '{' at column 3 should be on the previous line. (347:3) [LeftCurlyCheck]
        • '{' at column 3 should be on the previous line. (362:3) [LeftCurlyCheck]
        • Redundant 'final' modifier. (464:12) [RedundantModifierCheck]
        • switch without "default" clause. (538:0) [MissingSwitchDefaultCheck]
        • 'state' hides a field. (576:16) [HiddenFieldCheck]
        • 'state' hides a field. (747:45) [HiddenFieldCheck]
      • LogStream.java : 1 item(s)
        • Redundant 'public' modifier. (33:3) [RedundantModifierCheck]
      • LogStreamImpl.java : 6 item(s)
        • Variable 'listeners' must be private and have accessor methods. (51:24) [VisibilityModifierCheck]
        • Variable 'name' must be private and have accessor methods. (55:11) [VisibilityModifierCheck]
        • Variable 'raftClient' must be private and have accessor methods. (59:14) [VisibilityModifierCheck]
        • Variable 'config' must be private and have accessor methods. (63:27) [VisibilityModifierCheck]
        • Variable 'state' must be private and have accessor methods. (67:19) [VisibilityModifierCheck]
        • Variable 'length' must be private and have accessor methods. (72:8) [VisibilityModifierCheck]
      • MetaServiceProtoUtil.java : 3 item(s)
        • Unused import - org.apache.ratis.proto.RaftProtos. (27:8) [UnusedImportsCheck]
        • Utility classes should not have a public or default constructor. (40:1) [HideUtilityClassConstructorCheck]
        • Variable 'i' must be private and have accessor methods. (192:38) [VisibilityModifierCheck]
      • MetaStateMachine.java : 18 item(s)
        • Unused import - org.apache.ratis.metrics.impl.RatisMetricRegistryImpl. (53:8) [UnusedImportsCheck]
        • Name 'LOG' must match pattern '^[a-z][a-zA-Z0-9]*$'. (78:12) [MemberNameCheck]
        • Variable 'LOG' must be private and have accessor methods. (78:12) [VisibilityModifierCheck]
        • Must have at least one statement. (163:43) [EmptyBlockCheck]
        • 'properties' hides a field. (218:28) [HiddenFieldCheck]
        • 'peers' hides a field. (260:34) [HiddenFieldCheck]
        • Line is longer than 120 characters (found 124). (294:0) [LineLengthCheck]
        • Redundant 'final' modifier. (315:14) [RedundantModifierCheck]
        • Line is longer than 120 characters (found 124). (331:0) [LineLengthCheck]
        • 'peers' hides a field. (332:32) [HiddenFieldCheck]
        • Variable 'peer' must be private and have accessor methods. (402:18) [VisibilityModifierCheck]
        • Variable 'groups' must be private and have accessor methods. (403:24) [VisibilityModifierCheck]
        • Redundant 'public' modifier. (405:9) [RedundantModifierCheck]
        • Line is longer than 120 characters (found 123). (437:0) [LineLengthCheck]
        • Line is longer than 120 characters (found 130). (456:0) [LineLengthCheck]
        • 'if' construct must use '{}'s. (496:0) [NeedBracesCheck]
        • 'if' construct must use '{}'s. (497:0) [NeedBracesCheck]
        • 'if' construct must use '{}'s. (502:0) [NeedBracesCheck]
      • MetadataServer.java : 1 item(s)
        • Variable 'metaStateMachine' must be private and have accessor methods. (54:18) [VisibilityModifierCheck]
      • RaftLogReader.java : 7 item(s)
        • Unused import - org.apache.ratis.server.raftlog.RaftLogIOException. (22:8) [UnusedImportsCheck]
        • Unused import - org.apache.ratis.thirdparty.com.google.protobuf.ByteString. (23:8) [UnusedImportsCheck]
        • Unused import - org.apache.ratis.thirdparty.com.google.protobuf.InvalidProtocolBufferException. (24:8) [UnusedImportsCheck]
        • Redundant 'public' modifier. (32:3) [RedundantModifierCheck]
        • Redundant 'public' modifier. (37:3) [RedundantModifierCheck]
        • Redundant 'public' modifier. (43:3) [RedundantModifierCheck]
        • Redundant 'public' modifier. (49:3) [RedundantModifierCheck]
      • VerificationTool.java : 11 item(s)
        • Line is longer than 120 characters (found 121). (71:0) [LineLengthCheck]
        • Line is longer than 120 characters (found 144). (73:0) [LineLengthCheck]
        • Line is longer than 120 characters (found 142). (79:0) [LineLengthCheck]
        • Line is longer than 120 characters (found 162). (85:0) [LineLengthCheck]
        • Line has trailing spaces. (96:0) [RegexpSinglelineCheck]
        • 'abstract' modifier out of order with the JLS suggestions. (178:12) [ModifierOrderCheck]
        • Variable 'logName' must be private and have accessor methods. (180:21) [VisibilityModifierCheck]
        • Variable 'client' must be private and have accessor methods. (181:30) [VisibilityModifierCheck]
        • Variable 'numRecords' must be private and have accessor methods. (182:17) [VisibilityModifierCheck]
        • Variable 'logFreq' must be private and have accessor methods. (183:17) [VisibilityModifierCheck]
        • Variable 'valueSize' must be private and have accessor methods. (184:17) [VisibilityModifierCheck]

      Attachments

        1. RATIS-691.001.patch
          43 kB
          Dinesh Chitlangia
        2. RATIS-691.002.patch
          52 kB
          Dinesh Chitlangia
        3. RATIS-691.003.patch
          42 kB
          Dinesh Chitlangia

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m