LogInfo { public boolean matchesGroupId(TimelineEntityGroupId groupId) { return matchesGroupId(groupId.toString()); } LogInfo(String attemptDirName, String file, String owner); String getAttemptDirName(); long getOffset(); void setOffset(long newOffset); Path getPath(Path rootPath); String getFilename(); boolean matchesGroupId(TimelineEntityGroupId groupId); long parseForStore(TimelineDataManager tdm, Path appDirPath,
      boolean appCompleted, JsonFactory jsonFactory, ObjectMapper objMapper,
      FileSystem fs); static final String ENTITY_FILE_NAME_DELIMITERS; }
@Test public void testMatchesGroupId() throws Exception { String testGroupId = "app1_group1"; EntityLogInfo testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app1_group1", UserGroupInformation.getLoginUser().getUserName()); assertTrue(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "test_app1_group1", UserGroupInformation.getLoginUser().getUserName()); assertTrue(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app2_group1", UserGroupInformation.getLoginUser().getUserName()); assertFalse(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app1_group2", UserGroupInformation.getLoginUser().getUserName()); assertFalse(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app1_group12", UserGroupInformation.getLoginUser().getUserName()); assertFalse(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app1_group1_2", UserGroupInformation.getLoginUser().getUserName()); assertTrue(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app1_group1.dat", UserGroupInformation.getLoginUser().getUserName()); assertTrue(testLogInfo.matchesGroupId(testGroupId)); testLogInfo = new EntityLogInfo(TEST_ATTEMPT_DIR_NAME, "app2", UserGroupInformation.getLoginUser().getUserName()); assertFalse(testLogInfo.matchesGroupId(testGroupId)); }