Uploaded image for project: 'Giraph'
  1. Giraph
  2. GIRAPH-179

BspServiceMaster's PathFilter can be simplified

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: None
    • Labels:

      Description

        /**
         * Only get the finalized checkpoint files
         */
        public static class FinalizedCheckpointPathFilter implements PathFilter {
          @Override
          public boolean accept(Path path) {
            if (path.getName().endsWith(
                BspService.CHECKPOINT_FINALIZED_POSTFIX)) {
              return true;
            }
            return false;
          }
        }

      we can simplify this, eliminating the if statement and just returning the result of endsWith()

        Attachments

          Activity

            People

            • Assignee:
              devaraj.k Devaraj K
              Reporter:
              jghoman Jakob Homan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: