target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void migrateAndClear_badSessionResponse() throws JSONException { Task<AuthResult> task = Tasks.forException(new FirebaseWebRequestException("msg", 400)); when(mockStorageHelpers.getDigitsSessionJson()).thenReturn(VALID_DIGITS_SESSION); when(mockStorageHelpers.getUnsignedJWT(mjsonCaptor.capture())).thenRetu...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndClear_unauthorizedSessionResponse() throws JSONException { Task<AuthResult> task = Tasks.forException(new FirebaseWebRequestException("msg", 403)); when(mockStorageHelpers.getDigitsSessionJson()).thenReturn(VALID_DIGITS_SESSION); when(mockStorageHelpers.getUnsignedJWT(mjsonCaptor.capture()))...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndKeep_unauthorizedSessionResponse() throws JSONException { Task<AuthResult> task = Tasks.forException(new FirebaseWebRequestException("msg", 403)); when(mockStorageHelpers.getDigitsSessionJson()).thenReturn(VALID_DIGITS_SESSION); when(mockStorageHelpers.getUnsignedJWT(mjsonCaptor.capture()))....
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndKeep_tokenFound() throws JSONException { when(mockStorageHelpers.getDigitsSessionJson()).thenReturn(VALID_DIGITS_SESSION); when(mockStorageHelpers.getUnsignedJWT(mjsonCaptor.capture())).thenReturn(DIGITS_JWT); when(mockFirebaseAuth.signInWithCustomToken(DIGITS_JWT)).thenReturn(authResultTask...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndClear_foundFirebaseSession() throws JSONException { when(mockFirebaseAuth.getCurrentUser()).thenReturn(mockFirebaseUser); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); assertTrue(authMigrator.migrate(true).isSuccessful()); verify(mockSto...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndKeep_foundFirebaseSession() throws JSONException { when(mockFirebaseAuth.getCurrentUser()).thenReturn(mockFirebaseUser); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); assertTrue(authMigrator.migrate(false).isSuccessful()); verify(mockSto...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrate_noLegacyToken() { when(mockStorageHelpers.getDigitsSessionJson()).thenReturn(null); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); assertTrue(authMigrator.migrate(true).isSuccessful()); verify(mockFirebaseAuth, times(0)).signInWithCustomTok...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndClear_invalidToken() { when(mockStorageHelpers.getDigitsSessionJson()).thenReturn("invalid_session"); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); assertTrue(authMigrator.migrate(true).isSuccessful()); verify(mockStorageHelpers).clearDi...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@Test public void migrateAndKeep_invalidToken() { when(mockStorageHelpers.getDigitsSessionJson()).thenReturn("invalid_session"); AuthMigrator authMigrator = new AuthMigrator(mockFirebaseApp, mockStorageHelpers, mockFirebaseAuth); assertTrue(authMigrator.migrate(false).isSuccessful()); verify(mockStorageHelpers,times(0)...
public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser != null) { Log...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
AuthMigrator { public Task<Void> migrate(boolean cleanupDigitsSession) { final FirebaseUser currentUser = mFirebaseAuth.getCurrentUser(); final String sessionJson = mStorageHelpers.getDigitsSessionJson(); final Context context = mApp.getApplicationContext(); final RedeemableDigitsSessionBuilder builder; if (currentUser...
@DisplayName("connect command is parsed with valid -l param") @Test void testConnectCommandWithValidCacheParam() throws IOException { createCommander("connect -l 1 2 3"); }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@DisplayName("connect command will throw the ParameterException if -l param is invalid") @Test void testConnectCommandWithInvalidValidCacheParam() { assertThrows(ParameterException.class, () -> createCommander("connect -l str")); }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@DisplayName("Connect command with valid -u parameter will be parsed successfully") @Test void testValidUrlParamsIsParsed() throws IOException { createCommander("connect -u http: }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@DisplayName("Connect command with valid -f parameter will be parsed successfully") @Test void testValidFileParamsIsParsed() throws IOException { createCommander("connect -f some/file.json"); }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@DisplayName("Connect command with invalid -u parameter will throw an error") @Test void testInvalidUrlParamsIsFailedToParse() { assertThrows(ParameterException.class, () -> createCommander(" connect -u not_a_url")); }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@DisplayName("Connect command with empty -u parameter will throw an error") @Test void testEmptyUrlParamsIsFailedToParse() { assertThrows(ParameterException.class, () -> createCommander(" connect -u")); }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@DisplayName("Connect command with empty -f parameter will throw an error") @Test void testEmptyFileParamsIsFailedToParse() { assertThrows(ParameterException.class, () -> createCommander(" connect -u")); }
private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(operation, comman...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
StfCommander { private static JCommander createCommander(CommandContainer commandContainer, String[] args) { JCommander.Builder builder = JCommander.newBuilder(); for (String operation : commandContainer.getAllCommands()) { CommandContainer.Command command = commandContainer.getCommand(operation); builder.addCommand(op...
@Ignore @Test public void testUnfinishedBlock() throws InterruptedException { BlockingStatus status = new BlockingStatus(1, "test", Status.QUEUED); WatchingThread thread = new WatchingThread(status); thread.start(); synchronized (this) { wait(3000); } status.changeStatus(Status.SUCCEEDED); thread.join(); System.out.pri...
public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); Status blockOnFinishedStatus(); Status viewStatus(); void unblock(); void changeStatus(Status sta...
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); Status blockOnFinishedStatus(); Status viewStatus(); void unblock(); void changeStatus(Status sta...
@Test public void testHardlinkCopy() throws IOException { FileIOUtils.createDeepHardlink(sourceDir, destDir); assertTrue(areDirsEqual(sourceDir, destDir, true)); FileUtils.deleteDirectory(destDir); assertTrue(areDirsEqual(baseDir, sourceDir, true)); }
public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " doesn't exist");...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
@Test public void testHardlinkCopyNonSource() { boolean exception = false; try { FileIOUtils.createDeepHardlink(new File(sourceDir, "idonotexist"), destDir); } catch (IOException e) { System.out.println(e.getMessage()); System.out.println("Handled this case nicely."); exception = true; } assertTrue(exception); }
public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " doesn't exist");...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
FileIOUtils { public static void createDeepHardlink(File sourceDir, File destDir) throws IOException { if (!sourceDir.exists()) { throw new IOException("Source directory " + sourceDir.getPath() + " doesn't exist"); } else if (!destDir.exists()) { throw new IOException("Destination directory " + destDir.getPath() + " do...
@Test public void testAsciiUTF() throws IOException { String foreignText = "abcdefghijklmnopqrstuvwxyz"; byte[] utf8ByteArray = createUTF8ByteArray(foreignText); int length = utf8ByteArray.length; System.out.println("char length:" + foreignText.length() + " utf8BytesLength:" + utf8ByteArray.length + " for:" + foreignTe...
public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); }
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } }
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } }
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } static String getSourcePathFromClass(Class<?> contai...
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } static String getSourcePathFromClass(Class<?> contai...
@Test public void testForeignUTF() throws IOException { String foreignText = "안녕하세요, 제 이름은 박병호입니다"; byte[] utf8ByteArray = createUTF8ByteArray(foreignText); int length = utf8ByteArray.length; System.out.println("char length:" + foreignText.length() + " utf8BytesLength:" + utf8ByteArray.length + " for:" + foreignText); ...
public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); }
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } }
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } }
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } static String getSourcePathFromClass(Class<?> contai...
FileIOUtils { public static Pair<Integer, Integer> getUtf8Range(byte[] buffer, int offset, int length) { int start = getUtf8ByteStart(buffer, offset); int end = getUtf8ByteEnd(buffer, offset + length - 1); return new Pair<Integer, Integer>(start, end - start + 1); } static String getSourcePathFromClass(Class<?> contai...
@Test public void testWithException() { try { throw new Exception("This is an exception"); } catch (Exception e) { LoggingEvent event = createEventWithException("There was an exception", e); assertTrue(layout.format(event).startsWith("There was an exception\\njava.lang.Exception: This is an exception")); } }
@Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
@Test public void testNewLine() { LoggingEvent event = createMessageEvent("This message contains \n new lines"); assertTrue(layout.format(event).equals("This message contains \\n new lines")); }
@Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
@Test public void testQuote() { LoggingEvent event = createMessageEvent("This message contains \" quotes"); assertTrue(layout.format(event).equals("This message contains \\\" quotes")); }
@Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
@Test public void testTab() { LoggingEvent event = createMessageEvent("This message contains a tab \t"); assertTrue(layout.format(event).equals("This message contains a tab \\t")); }
@Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
@Test public void testBackSlash() { LoggingEvent event = createMessageEvent("This message contains a backslash \\"); assertTrue(layout.format(event).equals("This message contains a backslash \\\\")); }
@Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); }
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
PatternLayoutEscaped extends PatternLayout { @Override public String format(final LoggingEvent event) { if (event.getMessage() instanceof String) { return super.format(appendStackTraceToEvent(event)); } return super.format(event); } PatternLayoutEscaped(String s); PatternLayoutEscaped(); @Override String format(final ...
@Test public void testGetExternalAnalyzerValidFormat() { azkProps.put(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC, EXTERNAL_ANALYZER_TOPIC); azkProps.put(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", EXTERNAL_ANALYZER_TOPIC), EXTERNAL_ANALYZER_URL_VALID_FORMAT); when(mockRequest.get...
public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromRequest(topic, azkProps...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
@Test public void multipleStatusesWithJobCallbackTest() { Props props = new Props(); props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".1.url", "def"); Assert.assertTrue(JobCallbackUtil.isThereJobCallbackProperty(props, JobCallbackStatusEnum.STARTED, JobCallbackStatusEnum.COMPLETED, ...
public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl); }
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
@Test public void testGetExternalLogViewerValidFormat() { azkProps.put(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC, EXTERNAL_LOGVIEWER_TOPIC); azkProps.put(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", EXTERNAL_LOGVIEWER_TOPIC), EXTERNAL_LOGVIEWER_URL_VALID_FORMAT); String external...
public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFromJobAndExecId(topic,...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
@Test public void testGetExternalAnalyzerNotConfigured() { String executionExternalLinkURL = ExternalLinkUtils.getExternalAnalyzerOnReq(azkProps, mockRequest); assertTrue(executionExternalLinkURL.equals("")); }
public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromRequest(topic, azkProps...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
ExternalLinkUtils { public static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC); return getLinkFromReq...
@Test public void testGetLogViewerNotConfigured() { String executionExternalLinkURL = ExternalLinkUtils.getExternalLogViewer(azkProps, jobId, jobProps); assertTrue(executionExternalLinkURL.equals("")); }
public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFromJobAndExecId(topic,...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
ExternalLinkUtils { public static String getExternalLogViewer(Props azkProps, String jobId, Props jobProps) { if (!azkProps.containsKey(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC)) { return ""; } String topic = azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC); return getLinkFro...
@Test public void testEncodingToUFT8() { assertTrue(ExternalLinkUtils.encodeToUTF8(" ").equals("%20")); assertTrue(ExternalLinkUtils.encodeToUTF8("+").equals("%2B")); assertTrue(ExternalLinkUtils.encodeToUTF8("/").equals("%2F")); assertTrue(ExternalLinkUtils.encodeToUTF8(":").equals("%3A")); assertTrue(ExternalLinkUtil...
static String encodeToUTF8(String url) { try { return URLEncoder.encode(url, "UTF-8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { logger.error("Specified encoding is not supported", e); } return ""; }
ExternalLinkUtils { static String encodeToUTF8(String url) { try { return URLEncoder.encode(url, "UTF-8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { logger.error("Specified encoding is not supported", e); } return ""; } }
ExternalLinkUtils { static String encodeToUTF8(String url) { try { return URLEncoder.encode(url, "UTF-8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { logger.error("Specified encoding is not supported", e); } return ""; } }
ExternalLinkUtils { static String encodeToUTF8(String url) { try { return URLEncoder.encode(url, "UTF-8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { logger.error("Specified encoding is not supported", e); } return ""; } static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest...
ExternalLinkUtils { static String encodeToUTF8(String url) { try { return URLEncoder.encode(url, "UTF-8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { logger.error("Specified encoding is not supported", e); } return ""; } static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest...
@Test public void testFetchURL() { azkProps.put(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", "someTopic"), "This is a link"); assertTrue(ExternalLinkUtils.getURLForTopic("someTopic", azkProps).equals("This is a link")); }
static String getURLForTopic(String topic, Props azkProps) { return azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", topic), ""); }
ExternalLinkUtils { static String getURLForTopic(String topic, Props azkProps) { return azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", topic), ""); } }
ExternalLinkUtils { static String getURLForTopic(String topic, Props azkProps) { return azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", topic), ""); } }
ExternalLinkUtils { static String getURLForTopic(String topic, Props azkProps) { return azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", topic), ""); } static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req); static String getExternalLogViewer(Props azkPr...
ExternalLinkUtils { static String getURLForTopic(String topic, Props azkProps) { return azkProps.getString(ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace("${topic}", topic), ""); } static String getExternalAnalyzerOnReq(Props azkProps, HttpServletRequest req); static String getExternalLogViewer(Props azkPr...
@Ignore @Test public void testSendEmail() throws Exception{ Flow flow = project.getFlow("jobe"); flow.addFailureEmails(receiveAddrList); Assert.assertNotNull(flow); ExecutableFlow exFlow = new ExecutableFlow(project, flow); Emailer emailer = new Emailer(props); emailer.sendErrorEmail(exFlow); }
public void sendErrorEmail(ExecutableFlow flow, String... extraReasons) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.setTLS(tls); message.setAuth(super.hasMailAuth()); ExecutionOptions option = flow.getExecutionOptions(); MailCreator ...
Emailer extends AbstractMailer implements Alerter { public void sendErrorEmail(ExecutableFlow flow, String... extraReasons) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.setTLS(tls); message.setAuth(super.hasMailAuth()); ExecutionOptio...
Emailer extends AbstractMailer implements Alerter { public void sendErrorEmail(ExecutableFlow flow, String... extraReasons) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.setTLS(tls); message.setAuth(super.hasMailAuth()); ExecutionOptio...
Emailer extends AbstractMailer implements Alerter { public void sendErrorEmail(ExecutableFlow flow, String... extraReasons) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.setTLS(tls); message.setAuth(super.hasMailAuth()); ExecutionOptio...
Emailer extends AbstractMailer implements Alerter { public void sendErrorEmail(ExecutableFlow flow, String... extraReasons) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.setTLS(tls); message.setAuth(super.hasMailAuth()); ExecutionOptio...
@Test public void testHttpGet() throws Exception { MockRestfulApiClient mockClient = new MockRestfulApiClient(); @SuppressWarnings("unchecked") URI uri = MockRestfulApiClient.buildUri("test.com", 80, "test", true, new Pair <String,String>("Entry1","Value1")); String result = mockClient.httpGet(uri, null); Assert.assert...
public T httpGet(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpGet as the passed uri is null"); return null; } HttpGet get = new HttpGet(uri); return this.sendAndReturn((HttpGet)completeRequest(get, headerEntries)); }
RestfulApiClient { public T httpGet(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpGet as the passed uri is null"); return null; } HttpGet get = new HttpGet(uri); return this.sendAndReturn((HttpGet)completeRequest(get, headerEntries)); } }
RestfulApiClient { public T httpGet(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpGet as the passed uri is null"); return null; } HttpGet get = new HttpGet(uri); return this.sendAndReturn((HttpGet)completeRequest(get, headerEntries)); } }
RestfulApiClient { public T httpGet(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpGet as the passed uri is null"); return null; } HttpGet get = new HttpGet(uri); return this.sendAndReturn((HttpGet)completeRequest(get, headerEntries)); } T httpGet...
RestfulApiClient { public T httpGet(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpGet as the passed uri is null"); return null; } HttpGet get = new HttpGet(uri); return this.sendAndReturn((HttpGet)completeRequest(get, headerEntries)); } T httpGet...
@Test public void testHttpPost() throws Exception { MockRestfulApiClient mockClient = new MockRestfulApiClient(); @SuppressWarnings("unchecked") URI uri = MockRestfulApiClient.buildUri("test.com", 80, "test", true, new Pair <String,String>("Entry1","Value1")); ArrayList<NameValuePair> headerItems = new ArrayList<NameVa...
public T httpPost(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPost as the passed uri is null."); return null; } HttpPost post = new HttpPost(uri); return this.sendAndReturn(completeRequest(post,h...
RestfulApiClient { public T httpPost(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPost as the passed uri is null."); return null; } HttpPost post = new HttpPost(uri); return this.sendAndReturn(com...
RestfulApiClient { public T httpPost(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPost as the passed uri is null."); return null; } HttpPost post = new HttpPost(uri); return this.sendAndReturn(com...
RestfulApiClient { public T httpPost(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPost as the passed uri is null."); return null; } HttpPost post = new HttpPost(uri); return this.sendAndReturn(com...
RestfulApiClient { public T httpPost(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPost as the passed uri is null."); return null; } HttpPost post = new HttpPost(uri); return this.sendAndReturn(com...
@Test public void testHttpPut() throws Exception { MockRestfulApiClient mockClient = new MockRestfulApiClient(); @SuppressWarnings("unchecked") URI uri = MockRestfulApiClient.buildUri("test.com", 80, "test", true, new Pair <String,String>("Entry1","Value1")); ArrayList<NameValuePair> headerItems = new ArrayList<NameVal...
public T httpPut(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPut as the passed url is null or empty."); return null; } HttpPut put = new HttpPut(uri); return this.sendAndReturn(completeRequest(pu...
RestfulApiClient { public T httpPut(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPut as the passed url is null or empty."); return null; } HttpPut put = new HttpPut(uri); return this.sendAndReturn...
RestfulApiClient { public T httpPut(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPut as the passed url is null or empty."); return null; } HttpPut put = new HttpPut(uri); return this.sendAndReturn...
RestfulApiClient { public T httpPut(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPut as the passed url is null or empty."); return null; } HttpPut put = new HttpPut(uri); return this.sendAndReturn...
RestfulApiClient { public T httpPut(URI uri, List<NameValuePair> headerEntries, String postingBody) throws UnsupportedEncodingException, IOException{ if (null == uri){ logger.error(" unable to perform httpPut as the passed url is null or empty."); return null; } HttpPut put = new HttpPut(uri); return this.sendAndReturn...
@Test public void testHttpDelete() throws Exception { MockRestfulApiClient mockClient = new MockRestfulApiClient(); @SuppressWarnings("unchecked") URI uri = MockRestfulApiClient.buildUri("test.com", 80, "test", true, new Pair <String,String>("Entry1","Value1")); ArrayList<NameValuePair> headerItems = new ArrayList<Name...
public T httpDelete(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpDelete as the passed uri is null."); return null; } HttpDelete delete = new HttpDelete(uri); return this.sendAndReturn((HttpDelete)completeRequest(delete, headerEntries)); }
RestfulApiClient { public T httpDelete(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpDelete as the passed uri is null."); return null; } HttpDelete delete = new HttpDelete(uri); return this.sendAndReturn((HttpDelete)completeRequest(delete, headerE...
RestfulApiClient { public T httpDelete(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpDelete as the passed uri is null."); return null; } HttpDelete delete = new HttpDelete(uri); return this.sendAndReturn((HttpDelete)completeRequest(delete, headerE...
RestfulApiClient { public T httpDelete(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpDelete as the passed uri is null."); return null; } HttpDelete delete = new HttpDelete(uri); return this.sendAndReturn((HttpDelete)completeRequest(delete, headerE...
RestfulApiClient { public T httpDelete(URI uri, List<NameValuePair> headerEntries) throws IOException{ if (null == uri){ logger.error(" unable to perform httpDelete as the passed uri is null."); return null; } HttpDelete delete = new HttpDelete(uri); return this.sendAndReturn((HttpDelete)completeRequest(delete, headerE...
@Test public void hasCallbackPropertiesWithGapTest() { Props props = new Props(); for (JobCallbackStatusEnum jobStatus : JobCallbackStatusEnum.values()) { props.put( "job.notification." + jobStatus.name().toLowerCase() + ".2.url", "def"); } System.out.println(props); Assert.assertFalse(JobCallbackUtil.isThereJobCallbac...
public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl); }
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
JobCallbackUtil { public static boolean isThereJobCallbackProperty(Props props, JobCallbackStatusEnum status) { if (props == null || status == null) { throw new NullPointerException("One of the argument is null"); } String jobCallBackUrl = firstJobcallbackPropertyMap.get(status); return props.containsKey(jobCallBackUrl...
@Test public void testNegativePort() { Assert.assertFalse(Utils.isValidPort(-1)); Assert.assertFalse(Utils.isValidPort(-10)); }
public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
@Test public void testZeroPort() { Assert.assertFalse(Utils.isValidPort(0)); }
public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
@Test public void testOverflowPort() { Assert.assertFalse(Utils.isValidPort(70000)); Assert.assertFalse(Utils.isValidPort(65536)); }
public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
@Test public void testValidPort() { Assert.assertTrue(Utils.isValidPort(1023)); Assert.assertTrue(Utils.isValidPort(10000)); Assert.assertTrue(Utils.isValidPort(3030)); Assert.assertTrue(Utils.isValidPort(1045)); }
public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); }
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
Utils { public static boolean isValidPort(int port) { if (port >= 1 && port <= 65535) { return true; } return false; } private Utils(); static boolean equals(Object a, Object b); static T nonNull(T t); static File findFilefromDir(File dir, String fn); static void croak(String message, int exitCode); static boolean isV...
@Test public void testValidCronExpressionV() { DateTimeZone timezone = DateTimeZone.getDefault(); Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * *", timezone)); Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * * 2017", timezone)); Assert.assertTrue(Utils.isCronExpressionValid("0 0 * ? * *", timezone))...
public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTimeAfter(...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
@Test public void testInvalidCronExpression() { DateTimeZone timezone = DateTimeZone.getDefault(); Assert.assertFalse(Utils.isCronExpressionValid("0 0 3 * * *", timezone)); Assert.assertFalse(Utils.isCronExpressionValid("0 66 * ? * *", timezone)); Assert.assertFalse(Utils.isCronExpressionValid("0 * * ? * 8", timezone))...
public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTimeAfter(...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
Utils { public static boolean isCronExpressionValid(String cronExpression, DateTimeZone timezone) { if (!CronExpression.isValidExpression(cronExpression)) { return false; } CronExpression cronExecutionTime = parseCronExpression(cronExpression, timezone); if (cronExecutionTime == null || cronExecutionTime.getNextValidTi...
@Test public void testCreateEmailMessage(){ Props props = createMailProperties(); props.put("mail.port","445"); AbstractMailer mailer = new AbstractMailer(props); EmailMessage emailMessage = mailer.createEmailMessage("subject","text/html",senderList); assert emailMessage.getMailPort()==445; }
protected EmailMessage createEmailMessage(String subject, String mimetype, Collection<String> emailList) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.addAllToAddress(emailList); message.setMimeType(mimetype); message.setSubject(subjec...
AbstractMailer { protected EmailMessage createEmailMessage(String subject, String mimetype, Collection<String> emailList) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.addAllToAddress(emailList); message.setMimeType(mimetype); message....
AbstractMailer { protected EmailMessage createEmailMessage(String subject, String mimetype, Collection<String> emailList) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.addAllToAddress(emailList); message.setMimeType(mimetype); message....
AbstractMailer { protected EmailMessage createEmailMessage(String subject, String mimetype, Collection<String> emailList) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.addAllToAddress(emailList); message.setMimeType(mimetype); message....
AbstractMailer { protected EmailMessage createEmailMessage(String subject, String mimetype, Collection<String> emailList) { EmailMessage message = new EmailMessage(mailHost, mailPort, mailUser, mailPassword); message.setFromAddress(mailSender); message.addAllToAddress(emailList); message.setMimeType(mimetype); message....
@Test public void TestFilterNonAdminOnlyFlowParams() throws IOException, ExecutorManagerException, UserManagerException { ExecutableFlow flow = createExecutableFlow(); UserManager manager = TestUtils.createTestXmlUserManager(); User user = manager.getUser("testUser", "testUser"); HttpRequestUtils.filterAdminOnlyFlowPar...
public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, user, Type.ADMIN)) { ...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
@Test public void TestFilterAdminOnlyFlowParams() throws IOException, ExecutorManagerException, UserManagerException { ExecutableFlow flow = createExecutableFlow(); UserManager manager = TestUtils.createTestXmlUserManager(); User user = manager.getUser("testAdmin", "testAdmin"); HttpRequestUtils.filterAdminOnlyFlowPara...
public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, user, Type.ADMIN)) { ...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
HttpRequestUtils { public static void filterAdminOnlyFlowParams(UserManager userManager, ExecutionOptions options, User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) return; Map<String, String> params = options.getFlowParameters(); if (!hasPermission(userManager, us...
@Test public void testvalidIntegerParam() throws ExecutorManagerException { Map<String, String> params = new HashMap<String, String>(); params.put("param1", "123"); HttpRequestUtils.validateIntegerParam(params, "param1"); }
public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); } return true; }
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
@Test public void noTokenTest() { String urlWithNoToken = "http: String result = JobCallbackUtil.replaceTokens(urlWithNoToken, contextInfo, true); Assert.assertEquals(urlWithNoToken, result); }
public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tokenValue = encodeQu...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
@Test(expected = ExecutorManagerException.class) public void testInvalidIntegerParam() throws ExecutorManagerException { Map<String, String> params = new HashMap<String, String>(); params.put("param1", "1dff2"); HttpRequestUtils.validateIntegerParam(params, "param1"); }
public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); } return true; }
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
HttpRequestUtils { public static boolean validateIntegerParam(Map<String, String> params, String paramName) throws ExecutorManagerException { if (params != null && params.containsKey(paramName) && !StringUtils.isNumeric(params.get(paramName))) { throw new ExecutorManagerException(paramName + " should be an integer"); }...
@Test public void testHasAdminPermission() throws UserManagerException { UserManager manager = TestUtils.createTestXmlUserManager(); User adminUser = manager.getUser("testAdmin", "testAdmin"); Assert.assertTrue(HttpRequestUtils.hasPermission(manager, adminUser, Type.ADMIN)); }
public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return true; } } return fa...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
@Test public void testHasOrdinaryPermission() throws UserManagerException { UserManager manager = TestUtils.createTestXmlUserManager(); User testUser = manager.getUser("testUser", "testUser"); Assert.assertFalse(HttpRequestUtils.hasPermission(manager, testUser, Type.ADMIN)); }
public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return true; } } return fa...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
HttpRequestUtils { public static boolean hasPermission(UserManager userManager, User user, Permission.Type type) { for (String roleName : user.getRoles()) { Role role = userManager.getRole(roleName); if (role.getPermission().isPermissionSet(type) || role.getPermission().isPermissionSet(Permission.Type.ADMIN)) { return ...
@Test public void testAddWarnLevelInfoMsg() { ValidationReport report = new ValidationReport(); String msg = "test warn level info message."; report.addWarnLevelInfoMsg(msg); for (String info : report.getInfoMsgs()) { assertEquals("Info message added through addWarnLevelInfoMsg should have level set to WARN", Validatio...
public void addWarnLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("WARN" + msg); } }
ValidationReport { public void addWarnLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("WARN" + msg); } } }
ValidationReport { public void addWarnLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("WARN" + msg); } } ValidationReport(); }
ValidationReport { public void addWarnLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("WARN" + msg); } } ValidationReport(); void addWarnLevelInfoMsg(String msg); void addErrorLevelInfoMsg(String msg); void addWarningMsgs(Set<String> msgs); void addErrorMsgs(Set<String> msgs); ValidationStatus getStatus(); ...
ValidationReport { public void addWarnLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("WARN" + msg); } } ValidationReport(); void addWarnLevelInfoMsg(String msg); void addErrorLevelInfoMsg(String msg); void addWarningMsgs(Set<String> msgs); void addErrorMsgs(Set<String> msgs); ValidationStatus getStatus(); ...
@Test public void testAddErrorLevelInfoMsg() { ValidationReport report = new ValidationReport(); String msg = "test error level error message."; report.addErrorLevelInfoMsg(msg); for (String info : report.getInfoMsgs()) { assertEquals("Info message added through addErrorLevelInfoMsg should have level set to ERROR", Val...
public void addErrorLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("ERROR" + msg); } }
ValidationReport { public void addErrorLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("ERROR" + msg); } } }
ValidationReport { public void addErrorLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("ERROR" + msg); } } ValidationReport(); }
ValidationReport { public void addErrorLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("ERROR" + msg); } } ValidationReport(); void addWarnLevelInfoMsg(String msg); void addErrorLevelInfoMsg(String msg); void addWarningMsgs(Set<String> msgs); void addErrorMsgs(Set<String> msgs); ValidationStatus getStatus()...
ValidationReport { public void addErrorLevelInfoMsg(String msg) { if (msg != null) { _infoMsgs.add("ERROR" + msg); } } ValidationReport(); void addWarnLevelInfoMsg(String msg); void addErrorLevelInfoMsg(String msg); void addWarningMsgs(Set<String> msgs); void addErrorMsgs(Set<String> msgs); ValidationStatus getStatus()...
@Test public void testNoValidatorsDir() { Props props = new Props(baseProps); XmlValidatorManager manager = new XmlValidatorManager(props); assertEquals("XmlValidatorManager should contain only the default validator when no xml configuration " + "file is present.", manager.getValidatorsInfo().size(), 1); assertEquals("...
@Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; }
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } }
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } XmlValidatorManager(Props props); }
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } XmlValidatorManager(Props props); @Override void loadValidators(Props props, Logger log); @Override ...
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } XmlValidatorManager(Props props); @Override void loadValidators(Props props, Logger log); @Override ...
@Test public void testDefaultValidator() { Props props = new Props(baseProps); URL validatorUrl = Resources.getResource("project/testValidators"); props.put(ValidatorConfigs.VALIDATOR_PLUGIN_DIR, validatorUrl.getPath()); XmlValidatorManager manager = new XmlValidatorManager(props); assertEquals("XmlValidatorManager sho...
@Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; }
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } }
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } XmlValidatorManager(Props props); }
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } XmlValidatorManager(Props props); @Override void loadValidators(Props props, Logger log); @Override ...
XmlValidatorManager implements ValidatorManager { @Override public List<String> getValidatorsInfo() { List<String> info = new ArrayList<String>(); for (String key : validators.keySet()) { info.add(key); } return info; } XmlValidatorManager(Props props); @Override void loadValidators(Props props, Logger log); @Override ...
@Test public void testLoadValidators() { Props props = new Props(baseProps); URL validatorUrl = Resources.getResource("project/testValidators"); URL configUrl = Resources.getResource("test-conf/azkaban-validators-test2.xml"); props.put(ValidatorConfigs.VALIDATOR_PLUGIN_DIR, validatorUrl.getPath()); props.put(ValidatorC...
@Override public void loadValidators(Props props, Logger log) { validators = new LinkedHashMap<String, ProjectValidator>(); DirectoryFlowLoader flowLoader = new DirectoryFlowLoader(props, log); validators.put(flowLoader.getValidatorName(), flowLoader); if (!props.containsKey(ValidatorConfigs.XML_FILE_PARAM)) { logger.w...
XmlValidatorManager implements ValidatorManager { @Override public void loadValidators(Props props, Logger log) { validators = new LinkedHashMap<String, ProjectValidator>(); DirectoryFlowLoader flowLoader = new DirectoryFlowLoader(props, log); validators.put(flowLoader.getValidatorName(), flowLoader); if (!props.contai...
XmlValidatorManager implements ValidatorManager { @Override public void loadValidators(Props props, Logger log) { validators = new LinkedHashMap<String, ProjectValidator>(); DirectoryFlowLoader flowLoader = new DirectoryFlowLoader(props, log); validators.put(flowLoader.getValidatorName(), flowLoader); if (!props.contai...
XmlValidatorManager implements ValidatorManager { @Override public void loadValidators(Props props, Logger log) { validators = new LinkedHashMap<String, ProjectValidator>(); DirectoryFlowLoader flowLoader = new DirectoryFlowLoader(props, log); validators.put(flowLoader.getValidatorName(), flowLoader); if (!props.contai...
XmlValidatorManager implements ValidatorManager { @Override public void loadValidators(Props props, Logger log) { validators = new LinkedHashMap<String, ProjectValidator>(); DirectoryFlowLoader flowLoader = new DirectoryFlowLoader(props, log); validators.put(flowLoader.getValidatorName(), flowLoader); if (!props.contai...
@Test public void testInvalidProjectByFetchProjectByName() { if (!isTestSetup()) { return; } ProjectLoader loader = createLoader(); try { loader.fetchProjectByName("NonExistantProject"); } catch (ProjectManagerException ex) { System.out.println("Test true"); } Assert.fail("Expecting exception, but didn't get one"); }
@Override public Project fetchProjectByName(String name) throws ProjectManagerException { Connection connection = getConnection(); Project project = null; try { project = fetchProjectByName(connection, name); } finally { DbUtils.closeQuietly(connection); } return project; }
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public Project fetchProjectByName(String name) throws ProjectManagerException { Connection connection = getConnection(); Project project = null; try { project = fetchProjectByName(connection, name); } finally { DbUtils.closeQuietly(co...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public Project fetchProjectByName(String name) throws ProjectManagerException { Connection connection = getConnection(); Project project = null; try { project = fetchProjectByName(connection, name); } finally { DbUtils.closeQuietly(co...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public Project fetchProjectByName(String name) throws ProjectManagerException { Connection connection = getConnection(); Project project = null; try { project = fetchProjectByName(connection, name); } finally { DbUtils.closeQuietly(co...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public Project fetchProjectByName(String name) throws ProjectManagerException { Connection connection = getConnection(); Project project = null; try { project = fetchProjectByName(connection, name); } finally { DbUtils.closeQuietly(co...
@Test public void testRemoveProject() throws ProjectManagerException { if (!isTestSetup()) { return; } ProjectLoader loader = createLoader(); String projectName = "testRemoveProject"; String projectDescription = "This is my new project"; User user = new User("testUser"); Project project = loader.createNewProject(projec...
@Override public void removeProject(Project project, String user) throws ProjectManagerException { QueryRunner runner = createQueryRunner(); long updateTime = System.currentTimeMillis(); final String UPDATE_INACTIVE_PROJECT = "UPDATE projects SET active=false,modified_time=?,last_modified_by=? WHERE id=?"; try { runner...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public void removeProject(Project project, String user) throws ProjectManagerException { QueryRunner runner = createQueryRunner(); long updateTime = System.currentTimeMillis(); final String UPDATE_INACTIVE_PROJECT = "UPDATE projects S...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public void removeProject(Project project, String user) throws ProjectManagerException { QueryRunner runner = createQueryRunner(); long updateTime = System.currentTimeMillis(); final String UPDATE_INACTIVE_PROJECT = "UPDATE projects S...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public void removeProject(Project project, String user) throws ProjectManagerException { QueryRunner runner = createQueryRunner(); long updateTime = System.currentTimeMillis(); final String UPDATE_INACTIVE_PROJECT = "UPDATE projects S...
JdbcProjectLoader extends AbstractJdbcLoader implements ProjectLoader { @Override public void removeProject(Project project, String user) throws ProjectManagerException { QueryRunner runner = createQueryRunner(); long updateTime = System.currentTimeMillis(); final String UPDATE_INACTIVE_PROJECT = "UPDATE projects S...
@Test public void oneTokenTest() { String urlWithOneToken = "http: String result = JobCallbackUtil.replaceTokens(urlWithOneToken, contextInfo, true); Assert.assertEquals("http: + "&another=yes", result); }
public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tokenValue = encodeQu...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
@Test public void testOneUnixCommand() throws Exception { props.put(ProcessJob.COMMAND, "ls -al"); job.run(); }
@Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean(MEMCHECK_ENABLED, false) && jobProps.ge...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
@Test public void testOneUnixCommandWithProxyUserInsteadOfSubmitUser() throws Exception { props.removeLocal(CommonJobProperties.SUBMIT_USER); props.put("user.to.proxy", "test_user"); props.put(ProcessJob.COMMAND, "ls -al"); job.run(); }
@Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean(MEMCHECK_ENABLED, false) && jobProps.ge...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
@Test (expected=RuntimeException.class) public void testOneUnixCommandWithNoUser() throws Exception { props.removeLocal(CommonJobProperties.SUBMIT_USER); props.put(ProcessJob.COMMAND, "ls -al"); job.run(); }
@Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean(MEMCHECK_ENABLED, false) && jobProps.ge...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
@Test public void testFailedUnixCommand() throws Exception { props.put(ProcessJob.COMMAND, "xls -al"); try { job.run(); } catch (RuntimeException e) { Assert.assertTrue(true); e.printStackTrace(); } }
@Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean(MEMCHECK_ENABLED, false) && jobProps.ge...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
@Test public void testMultipleUnixCommands() throws Exception { props.put(ProcessJob.COMMAND, "pwd"); props.put("command.1", "date"); props.put("command.2", "whoami"); job.run(); }
@Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean(MEMCHECK_ENABLED, false) && jobProps.ge...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
ProcessJob extends AbstractProcessJob { @Override public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } getLog().info("ProcessJob sysProps:" + sysProps); getLog().info("ProcessJob jobProps:" + jobProps); if (sysProps.getBoolean...
@Test public void testPartitionCommand() throws Exception { String test1 = "a b c"; Assert.assertArrayEquals(new String[] { "a", "b", "c" }, ProcessJob.partitionCommandLine(test1)); String test2 = "a 'b c'"; Assert.assertArrayEquals(new String[] { "a", "b c" }, ProcessJob.partitionCommandLine(test2)); String test3 = "a...
public static String[] partitionCommandLine(final String command) { ArrayList<String> commands = new ArrayList<String>(); int index = 0; StringBuffer buffer = new StringBuffer(command.length()); boolean isApos = false; boolean isQuote = false; while (index < command.length()) { char c = command.charAt(index); switch (c...
ProcessJob extends AbstractProcessJob { public static String[] partitionCommandLine(final String command) { ArrayList<String> commands = new ArrayList<String>(); int index = 0; StringBuffer buffer = new StringBuffer(command.length()); boolean isApos = false; boolean isQuote = false; while (index < command.length()) { c...
ProcessJob extends AbstractProcessJob { public static String[] partitionCommandLine(final String command) { ArrayList<String> commands = new ArrayList<String>(); int index = 0; StringBuffer buffer = new StringBuffer(command.length()); boolean isApos = false; boolean isQuote = false; while (index < command.length()) { c...
ProcessJob extends AbstractProcessJob { public static String[] partitionCommandLine(final String command) { ArrayList<String> commands = new ArrayList<String>(); int index = 0; StringBuffer buffer = new StringBuffer(command.length()); boolean isApos = false; boolean isQuote = false; while (index < command.length()) { c...
ProcessJob extends AbstractProcessJob { public static String[] partitionCommandLine(final String command) { ArrayList<String> commands = new ArrayList<String>(); int index = 0; StringBuffer buffer = new StringBuffer(command.length()); boolean isApos = false; boolean isQuote = false; while (index < command.length()) { c...
@Ignore("Test appears to hang.") @Test public void testPythonJob() { props = new Props(); props.put(AbstractProcessJob.WORKING_DIR, "."); props.put("type", "python"); props.put("script", scriptFile); props.put("t", "90"); props.put("type", "script"); props.put("fullPath", "."); job = new PythonJob("TestProcess", props,...
public PythonJob(String jobid, Props sysProps, Props jobProps, Logger log) { super(jobid, new String[] { jobProps.getString(PYTHON_BINARY_KEY, "python"), jobProps.getString(SCRIPT_KEY) }, sysProps, jobProps, log, ImmutableSet.of(PYTHON_BINARY_KEY, SCRIPT_KEY, JOB_TYPE)); }
PythonJob extends LongArgJob { public PythonJob(String jobid, Props sysProps, Props jobProps, Logger log) { super(jobid, new String[] { jobProps.getString(PYTHON_BINARY_KEY, "python"), jobProps.getString(SCRIPT_KEY) }, sysProps, jobProps, log, ImmutableSet.of(PYTHON_BINARY_KEY, SCRIPT_KEY, JOB_TYPE)); } }
PythonJob extends LongArgJob { public PythonJob(String jobid, Props sysProps, Props jobProps, Logger log) { super(jobid, new String[] { jobProps.getString(PYTHON_BINARY_KEY, "python"), jobProps.getString(SCRIPT_KEY) }, sysProps, jobProps, log, ImmutableSet.of(PYTHON_BINARY_KEY, SCRIPT_KEY, JOB_TYPE)); } PythonJob(Strin...
PythonJob extends LongArgJob { public PythonJob(String jobid, Props sysProps, Props jobProps, Logger log) { super(jobid, new String[] { jobProps.getString(PYTHON_BINARY_KEY, "python"), jobProps.getString(SCRIPT_KEY) }, sysProps, jobProps, log, ImmutableSet.of(PYTHON_BINARY_KEY, SCRIPT_KEY, JOB_TYPE)); } PythonJob(Strin...
PythonJob extends LongArgJob { public PythonJob(String jobid, Props sysProps, Props jobProps, Logger log) { super(jobid, new String[] { jobProps.getString(PYTHON_BINARY_KEY, "python"), jobProps.getString(SCRIPT_KEY) }, sysProps, jobProps, log, ImmutableSet.of(PYTHON_BINARY_KEY, SCRIPT_KEY, JOB_TYPE)); } PythonJob(Strin...
@Test public void testWhenGetRequestSessionIsValid() throws Exception, IOException, ServletException { String clientIp = "127.0.0.1:10000"; String sessionId = "111"; HttpServletRequest req = MockLoginAzkabanServlet.getRequestWithNoUpstream(clientIp, sessionId, "GET"); StringWriter writer = new StringWriter(); HttpServl...
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout")) { resp.sendRedirect(req.getContextPath()); if (session != null) { getApplication().getSessionCache(...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout")) { resp.sendRedirect(req.getContext...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout")) { resp.sendRedirect(req.getContext...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout")) { resp.sendRedirect(req.getContext...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (hasParam(req, "logout")) { resp.sendRedirect(req.getContext...
@Test public void testWhenPostRequestSessionIsValid() throws Exception{ String clientIp = "127.0.0.1:10000"; String sessionId = "111"; HttpServletRequest req = MockLoginAzkabanServlet.getRequestWithNoUpstream(clientIp, sessionId, "POST"); StringWriter writer = new StringWriter(); HttpServletResponse resp = getResponse(...
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, Object> params = multipartParser.parseMultipart(req); if (session ...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
@Test public void testWhenPostRequestChangedClientIpSessionIsInvalid() throws Exception{ String clientIp = "127.0.0.2:10000"; String sessionId = "111"; HttpServletRequest req = MockLoginAzkabanServlet.getRequestWithNoUpstream(clientIp, sessionId, "POST"); StringWriter writer = new StringWriter(); HttpServletResponse re...
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, Object> params = multipartParser.parseMultipart(req); if (session ...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
@Test public void twoTokensTest() { String urlWithOneToken = "http: + CONTEXT_FLOW_TOKEN; String result = JobCallbackUtil.replaceTokens(urlWithOneToken, contextInfo, true); Assert.assertEquals("http: + "&flow=" + FLOW_NAME, result); }
public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tokenValue = encodeQu...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
@Test public void testWhenPostRequestChangedClientPortSessionIsValid() throws Exception{ String clientIp = "127.0.0.1:10000"; String sessionId = "111"; HttpServletRequest req = MockLoginAzkabanServlet.getRequestWithNoUpstream(clientIp, sessionId, "POST"); StringWriter writer = new StringWriter(); HttpServletResponse re...
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, Object> params = multipartParser.parseMultipart(req); if (session ...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
@Test public void testWhenPostRequestWithUpstreamSessionIsValid() throws Exception{ String clientIp = "127.0.0.1:10000"; String upstreamIp = "192.168.1.1:11111"; String sessionId = "111"; HttpServletRequest req = MockLoginAzkabanServlet.getRequestWithUpstream(clientIp, upstreamIp, sessionId, "POST"); StringWriter write...
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, Object> params = multipartParser.parseMultipart(req); if (session ...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
@Test public void testWhenPostRequestWithMultipleUpstreamsSessionIsValid() throws Exception{ String clientIp = "127.0.0.1:10000"; String upstreamIp = "192.168.1.1:11111,888.8.8.8:2222,5.5.5.5:5555"; String sessionId = "111"; HttpServletRequest req = MockLoginAzkabanServlet.getRequestWithUpstream(clientIp, upstreamIp, s...
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, Object> params = multipartParser.parseMultipart(req); if (session ...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
LoginAbstractAzkabanServlet extends AbstractAzkabanServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Session session = getSessionFromRequest(req); logRequest(req, session); if (ServletFileUpload.isMultipartContent(req)) { Map<String, O...
@Test public void allTokensTest() { String urlWithOneToken = "http: + CONTEXT_PROJECT_TOKEN + "&flow=" + CONTEXT_FLOW_TOKEN + "&executionId=" + CONTEXT_EXECUTION_ID_TOKEN + "&job=" + CONTEXT_JOB_TOKEN + "&status=" + CONTEXT_JOB_STATUS_TOKEN; String result = JobCallbackUtil.replaceTokens(urlWithOneToken, contextInfo, tr...
public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tokenValue = encodeQu...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
@Test public void tokenWithEncoding() throws Exception { String jobNameWithSpaces = "my job"; String encodedJobName = URLEncoder.encode(jobNameWithSpaces, "UTF-8"); Map<String, String> customContextInfo = new HashMap<String, String>(); customContextInfo = new HashMap<String, String>(); customContextInfo.put(CONTEXT_SER...
public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tokenValue = encodeQu...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
JobCallbackUtil { public static String replaceTokens(String value, Map<String, String> contextInfo, boolean withEncoding) { String result = value; String tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding); result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue); tok...
@Test public void parseJobCallbackOneGetTest() { Props props = new Props(); String url = "http: props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".1.url", url); List<HttpRequestBase> result = JobCallbackUtil.parseJobCallbackProperties(props, JobCallbackStatusEnum.STARTED, contextInfo...
public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
@Test public void parseJobCallbackWithInvalidURLTest() { Props props = new Props(); String url = "linkedin.com"; props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".1.url", url); List<HttpRequestBase> result = JobCallbackUtil.parseJobCallbackProperties(props, JobCallbackStatusEnum.STA...
public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
@Test public void parseJobCallbackTwoGetsTest() { Props props = new Props(); String[] urls = { "http: "http: props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".1.url", urls[0]); props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".2.url", urls[1]); L...
public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
@Ignore @Test public void testUnfinishedBlockSeveralChanges() throws InterruptedException { BlockingStatus status = new BlockingStatus(1, "test", Status.QUEUED); WatchingThread thread = new WatchingThread(status); thread.start(); synchronized (this) { wait(3000); } status.changeStatus(Status.PAUSED); synchronized (this...
public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); Status blockOnFinishedStatus(); Status viewStatus(); void unblock(); void changeStatus(Status sta...
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); Status blockOnFinishedStatus(); Status viewStatus(); void unblock(); void changeStatus(Status sta...
@Test public void parseJobCallbackWithGapTest() { Props props = new Props(); String[] urls = { "http: "http: props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".1.url", urls[0]); props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".3.url", urls[1]); L...
public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
@Test public void parseJobCallbackWithPostTest() { Props props = new Props(); String url = "http: String bodyText = "{name:\"you\"}"; props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ".1.url", url); props.put("job.notification." + JobCallbackStatusEnum.STARTED.name().toLowerCase() + ...
public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } }
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
JobCallbackUtil { public static List<HttpRequestBase> parseJobCallbackProperties(Props props, JobCallbackStatusEnum status, Map<String, String> contextInfo, int maxNumCallback) { return parseJobCallbackProperties(props, status, contextInfo, maxNumCallback, logger); } static boolean isThereJobCallbackProperty(Props pro...
@Test public void noHeaderElementTest() { Header[] headerArr = JobCallbackUtil.parseHttpHeaders("this is an amazing day"); Assert.assertNotNull(headerArr); Assert.assertEquals(0, headerArr.length); }
public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { String headerPair =...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
@Test public void oneHeaderElementTest() { String name = "Content-type"; String value = "application/json"; String headers = name + JobCallbackConstants.HEADER_NAME_VALUE_DELIMITER + value; Header[] headerArr = JobCallbackUtil.parseHttpHeaders(headers); Assert.assertNotNull(headerArr); Assert.assertEquals(1, headerArr....
public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { String headerPair =...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
@Test public void multipleHeaderElementTest() { String name1 = "Content-type"; String value1 = "application/json"; String name2 = "Accept"; String value2 = "application/xml"; String name3 = "User-Agent"; String value3 = "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/21.0"; String headers = makeHeaderE...
public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { String headerPair =...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
@Test public void partialHeaderElementTest() { String name1 = "Content-type"; String value1 = "application/json"; String name2 = "Accept"; String value2 = ""; String name3 = "User-Agent"; String value3 = "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/21.0"; String headers = makeHeaderElement(name1, va...
public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { String headerPair =...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
JobCallbackUtil { public static Header[] parseHttpHeaders(String headers) { if (headers == null || headers.length() == 0) { return null; } String[] headerArray = headers.split(HEADER_ELEMENT_DELIMITER); List<Header> headerList = new ArrayList<Header>(headerArray.length); for (int i = 0; i < headerArray.length; i++) { S...
@Ignore @Test public void testBasicLoad() throws Exception { Props props = new Props(baseProps); props.put(XmlUserManager.XML_FILE_PARAM, "unit/test-conf/azkaban-users-test1.xml"); UserManager manager = null; try { manager = new XmlUserManager(props); } catch (RuntimeException e) { e.printStackTrace(); fail("XmlUserMan...
@Override public User getUser(String username, String password) throws UserManagerException { if (username == null || username.trim().isEmpty()) { throw new UserManagerException("Username is empty."); } else if (password == null || password.trim().isEmpty()) { throw new UserManagerException("Password is empty."); } Str...
XmlUserManager implements UserManager { @Override public User getUser(String username, String password) throws UserManagerException { if (username == null || username.trim().isEmpty()) { throw new UserManagerException("Username is empty."); } else if (password == null || password.trim().isEmpty()) { throw new UserManag...
XmlUserManager implements UserManager { @Override public User getUser(String username, String password) throws UserManagerException { if (username == null || username.trim().isEmpty()) { throw new UserManagerException("Username is empty."); } else if (password == null || password.trim().isEmpty()) { throw new UserManag...
XmlUserManager implements UserManager { @Override public User getUser(String username, String password) throws UserManagerException { if (username == null || username.trim().isEmpty()) { throw new UserManagerException("Username is empty."); } else if (password == null || password.trim().isEmpty()) { throw new UserManag...
XmlUserManager implements UserManager { @Override public User getUser(String username, String password) throws UserManagerException { if (username == null || username.trim().isEmpty()) { throw new UserManagerException("Username is empty."); } else if (password == null || password.trim().isEmpty()) { throw new UserManag...
@Test public void testEmptyPermissionCreation() throws Exception { Permission permission = new Permission(); permission.addPermissionsByName(new String[] {}); }
public void addPermissionsByName(String... list) { for (String perm : list) { Type type = Type.valueOf(perm); if (type != null) { addPermission(type); } ; } }
Permission { public void addPermissionsByName(String... list) { for (String perm : list) { Type type = Type.valueOf(perm); if (type != null) { addPermission(type); } ; } } }
Permission { public void addPermissionsByName(String... list) { for (String perm : list) { Type type = Type.valueOf(perm); if (type != null) { addPermission(type); } ; } } Permission(); Permission(int flags); Permission(Type... list); }
Permission { public void addPermissionsByName(String... list) { for (String perm : list) { Type type = Type.valueOf(perm); if (type != null) { addPermission(type); } ; } } Permission(); Permission(int flags); Permission(Type... list); void addPermissions(Permission perm); void setPermission(Type type, boolean set); v...
Permission { public void addPermissionsByName(String... list) { for (String perm : list) { Type type = Type.valueOf(perm); if (type != null) { addPermission(type); } ; } } Permission(); Permission(int flags); Permission(Type... list); void addPermissions(Permission perm); void setPermission(Type type, boolean set); v...
@Test public void testLocalExecutorScenario() throws ExecutorManagerException { Props props = new Props(); props.put("executor.port", 12345); ExecutorLoader loader = new MockExecutorLoader(); ExecutorManager manager = new ExecutorManager(props, loader, new HashMap<String, Alerter>()); Set<Executor> activeExecutors = ne...
@Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); }
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } }
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } ExecutorManager(Props azkProps, ExecutorLoader loader, Map<String, Alerter> alerters); }
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } ExecutorManager(Props azkProps, ExecutorLoader loader, Map<String, Alerter> alerters); @Override void setupExec...
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } ExecutorManager(Props azkProps, ExecutorLoader loader, Map<String, Alerter> alerters); @Override void setupExec...
@Test public void testMultipleExecutorScenario() throws ExecutorManagerException { Props props = new Props(); props.put(ExecutorManager.AZKABAN_USE_MULTIPLE_EXECUTORS, "true"); ExecutorLoader loader = new MockExecutorLoader(); Executor executor1 = loader.addExecutor("localhost", 12345); Executor executor2 = loader.addE...
@Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); }
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } }
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } ExecutorManager(Props azkProps, ExecutorLoader loader, Map<String, Alerter> alerters); }
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } ExecutorManager(Props azkProps, ExecutorLoader loader, Map<String, Alerter> alerters); @Override void setupExec...
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public Collection<Executor> getAllActiveExecutors() { return Collections.unmodifiableCollection(activeExecutors); } ExecutorManager(Props azkProps, ExecutorLoader loader, Map<String, Alerter> alerters); @Override void setupExec...
@Ignore @Test public void testMultipleWatchers() throws InterruptedException { BlockingStatus status = new BlockingStatus(1, "test", Status.QUEUED); WatchingThread thread1 = new WatchingThread(status); thread1.start(); synchronized (this) { wait(2000); } WatchingThread thread2 = new WatchingThread(status); thread2.star...
public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); }
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); Status blockOnFinishedStatus(); Status viewStatus(); void unblock(); void changeStatus(Status sta...
BlockingStatus { public void changeStatus(Status status) { synchronized (this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } } BlockingStatus(int execId, String jobId, Status initialStatus); Status blockOnFinishedStatus(); Status viewStatus(); void unblock(); void changeStatus(Status sta...
@Test(expected = ExecutorManagerException.class) public void testDuplicateQueuedFlows() throws ExecutorManagerException, IOException { ExecutorManager manager = createMultiExecutorManagerInstance(); ExecutableFlow flow1 = TestUtils.createExecutableFlow("exectest1", "exec1"); flow1.getExecutionOptions().setConcurrentOpt...
@Override public String submitExecutableFlow(ExecutableFlow exflow, String userId) throws ExecutorManagerException { synchronized (exflow) { String flowId = exflow.getFlowId(); logger.info("Submitting execution flow " + flowId + " by " + userId); String message = ""; if (queuedFlows.isFull()) { message = String .format...
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public String submitExecutableFlow(ExecutableFlow exflow, String userId) throws ExecutorManagerException { synchronized (exflow) { String flowId = exflow.getFlowId(); logger.info("Submitting execution flow " + flowId + " by " + userI...
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public String submitExecutableFlow(ExecutableFlow exflow, String userId) throws ExecutorManagerException { synchronized (exflow) { String flowId = exflow.getFlowId(); logger.info("Submitting execution flow " + flowId + " by " + userI...
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public String submitExecutableFlow(ExecutableFlow exflow, String userId) throws ExecutorManagerException { synchronized (exflow) { String flowId = exflow.getFlowId(); logger.info("Submitting execution flow " + flowId + " by " + userI...
ExecutorManager extends EventHandler implements ExecutorManagerAdapter { @Override public String submitExecutableFlow(ExecutableFlow exflow, String userId) throws ExecutorManagerException { synchronized (exflow) { String flowId = exflow.getFlowId(); logger.info("Submitting execution flow " + flowId + " by " + userI...
@Test public void testExecutorFlowCreation() throws Exception { Flow flow = project.getFlow("jobe"); Assert.assertNotNull(flow); ExecutableFlow exFlow = new ExecutableFlow(project, flow); Assert.assertNotNull(exFlow.getExecutableNode("joba")); Assert.assertNotNull(exFlow.getExecutableNode("jobb")); Assert.assertNotNull...
@Override public String getId() { return getFlowId(); }
ExecutableFlow extends ExecutableFlowBase { @Override public String getId() { return getFlowId(); } }
ExecutableFlow extends ExecutableFlowBase { @Override public String getId() { return getFlowId(); } ExecutableFlow(Project project, Flow flow); ExecutableFlow(); }
ExecutableFlow extends ExecutableFlowBase { @Override public String getId() { return getFlowId(); } ExecutableFlow(Project project, Flow flow); ExecutableFlow(); @Override int getOid(); @Override void setOid(int oid); @Override String getId(); @Override ExecutableFlow getExecutableFlow(); void addAllProxyUsers(Collect...
ExecutableFlow extends ExecutableFlowBase { @Override public String getId() { return getFlowId(); } ExecutableFlow(Project project, Flow flow); ExecutableFlow(); @Override int getOid(); @Override void setOid(int oid); @Override String getId(); @Override ExecutableFlow getExecutableFlow(); void addAllProxyUsers(Collect...
@Test(expected = ExecutorManagerException.class) public void testEnqueueDuplicateExecution() throws IOException, ExecutorManagerException { Pair<ExecutionReference, ExecutableFlow> pair1 = createExecutablePair("exec1", 1); QueuedExecutions queue = new QueuedExecutions(5); queue.enqueue(pair1.getSecond(), pair1.getFirst...
public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> pair = new Pair<Exe...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
@Test(expected = ExecutorManagerException.class) public void testEnqueueOverflow() throws IOException, ExecutorManagerException { Pair<ExecutionReference, ExecutableFlow> pair1 = createExecutablePair("exec1", 1); QueuedExecutions queue = new QueuedExecutions(1); queue.enqueue(pair1.getSecond(), pair1.getFirst()); queue...
public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> pair = new Pair<Exe...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
QueuedExecutions { public void enqueue(ExecutableFlow exflow, ExecutionReference ref) throws ExecutorManagerException { if (hasExecution(exflow.getExecutionId())) { String errMsg = "Flow already in queue " + exflow.getExecutionId(); throw new ExecutorManagerException(errMsg); } Pair<ExecutionReference, ExecutableFlow> ...
@Test public void testEnqueueAll() throws IOException, ExecutorManagerException { QueuedExecutions queue = new QueuedExecutions(5); List<Pair<ExecutionReference, ExecutableFlow>> dataList = getDummyData(); queue.enqueueAll(dataList); Assert.assertTrue(queue.getAllEntries().containsAll(dataList)); Assert.assertTrue(data...
public void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFlow>> collection) throws ExecutorManagerException { for (Pair<ExecutionReference, ExecutableFlow> pair : collection) { enqueue(pair.getSecond(), pair.getFirst()); } }
QueuedExecutions { public void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFlow>> collection) throws ExecutorManagerException { for (Pair<ExecutionReference, ExecutableFlow> pair : collection) { enqueue(pair.getSecond(), pair.getFirst()); } } }
QueuedExecutions { public void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFlow>> collection) throws ExecutorManagerException { for (Pair<ExecutionReference, ExecutableFlow> pair : collection) { enqueue(pair.getSecond(), pair.getFirst()); } } QueuedExecutions(long capacity); }
QueuedExecutions { public void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFlow>> collection) throws ExecutorManagerException { for (Pair<ExecutionReference, ExecutableFlow> pair : collection) { enqueue(pair.getSecond(), pair.getFirst()); } } QueuedExecutions(long capacity); Pair<ExecutionReference, Execu...
QueuedExecutions { public void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFlow>> collection) throws ExecutorManagerException { for (Pair<ExecutionReference, ExecutableFlow> pair : collection) { enqueue(pair.getSecond(), pair.getFirst()); } } QueuedExecutions(long capacity); Pair<ExecutionReference, Execu...
@Test public void testSize() throws IOException, ExecutorManagerException { QueuedExecutions queue = new QueuedExecutions(5); List<Pair<ExecutionReference, ExecutableFlow>> dataList = getDummyData(); queue.enqueueAll(dataList); Assert.assertEquals(queue.size(), 2); }
public long size() { return queuedFlowList.size(); }
QueuedExecutions { public long size() { return queuedFlowList.size(); } }
QueuedExecutions { public long size() { return queuedFlowList.size(); } QueuedExecutions(long capacity); }
QueuedExecutions { public long size() { return queuedFlowList.size(); } QueuedExecutions(long capacity); Pair<ExecutionReference, ExecutableFlow> fetchHead(); void dequeue(int executionId); void enqueue(ExecutableFlow exflow, ExecutionReference ref); void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFl...
QueuedExecutions { public long size() { return queuedFlowList.size(); } QueuedExecutions(long capacity); Pair<ExecutionReference, ExecutableFlow> fetchHead(); void dequeue(int executionId); void enqueue(ExecutableFlow exflow, ExecutionReference ref); void enqueueAll( Collection<Pair<ExecutionReference, ExecutableFl...
@Test public void testDequeue() throws IOException, ExecutorManagerException { QueuedExecutions queue = new QueuedExecutions(5); List<Pair<ExecutionReference, ExecutableFlow>> dataList = getDummyData(); queue.enqueueAll(dataList); queue.dequeue(dataList.get(0).getFirst().getExecId()); Assert.assertEquals(queue.size(), ...
public void dequeue(int executionId) { if (queuedFlowMap.containsKey(executionId)) { queuedFlowList.remove(queuedFlowMap.get(executionId)); queuedFlowMap.remove(executionId); } }
QueuedExecutions { public void dequeue(int executionId) { if (queuedFlowMap.containsKey(executionId)) { queuedFlowList.remove(queuedFlowMap.get(executionId)); queuedFlowMap.remove(executionId); } } }
QueuedExecutions { public void dequeue(int executionId) { if (queuedFlowMap.containsKey(executionId)) { queuedFlowList.remove(queuedFlowMap.get(executionId)); queuedFlowMap.remove(executionId); } } QueuedExecutions(long capacity); }
QueuedExecutions { public void dequeue(int executionId) { if (queuedFlowMap.containsKey(executionId)) { queuedFlowList.remove(queuedFlowMap.get(executionId)); queuedFlowMap.remove(executionId); } } QueuedExecutions(long capacity); Pair<ExecutionReference, ExecutableFlow> fetchHead(); void dequeue(int executionId); void...
QueuedExecutions { public void dequeue(int executionId) { if (queuedFlowMap.containsKey(executionId)) { queuedFlowList.remove(queuedFlowMap.get(executionId)); queuedFlowMap.remove(executionId); } } QueuedExecutions(long capacity); Pair<ExecutionReference, ExecutableFlow> fetchHead(); void dequeue(int executionId); void...
@Test public void testClear() throws IOException, ExecutorManagerException { QueuedExecutions queue = new QueuedExecutions(5); List<Pair<ExecutionReference, ExecutableFlow>> dataList = getDummyData(); queue.enqueueAll(dataList); Assert.assertEquals(queue.size(), 2); queue.clear(); Assert.assertEquals(queue.size(), 0); ...
public void clear() { for (Pair<ExecutionReference, ExecutableFlow> pair : queuedFlowMap.values()) { dequeue(pair.getFirst().getExecId()); } }
QueuedExecutions { public void clear() { for (Pair<ExecutionReference, ExecutableFlow> pair : queuedFlowMap.values()) { dequeue(pair.getFirst().getExecId()); } } }
QueuedExecutions { public void clear() { for (Pair<ExecutionReference, ExecutableFlow> pair : queuedFlowMap.values()) { dequeue(pair.getFirst().getExecId()); } } QueuedExecutions(long capacity); }
QueuedExecutions { public void clear() { for (Pair<ExecutionReference, ExecutableFlow> pair : queuedFlowMap.values()) { dequeue(pair.getFirst().getExecId()); } } QueuedExecutions(long capacity); Pair<ExecutionReference, ExecutableFlow> fetchHead(); void dequeue(int executionId); void enqueue(ExecutableFlow exflow, Exec...
QueuedExecutions { public void clear() { for (Pair<ExecutionReference, ExecutableFlow> pair : queuedFlowMap.values()) { dequeue(pair.getFirst().getExecId()); } } QueuedExecutions(long capacity); Pair<ExecutionReference, ExecutableFlow> fetchHead(); void dequeue(int executionId); void enqueue(ExecutableFlow exflow, Exec...