Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
FALCON-2336 StartupProperties shouldn't have specific logic to handle…
… safemode property

Author: pallavi-rao <pallavi.rao@inmobi.com>

Reviewers: @sandeepSamudrala

Closes #410 from pallavi-rao/2336
  • Loading branch information
pallavi-rao committed Aug 9, 2018
1 parent 90c955d commit 39f64a08e4b1ef0fbd33f4eb1ae2d69ad408d12b
Showing 2 changed files with 2 additions and 5 deletions.
@@ -63,15 +63,10 @@ public static Properties get() {
INSTANCE.compareAndSet(null, new StartupProperties());
storePath = new Path((INSTANCE.get().getProperty(CONFIGSTORE_PROPERTY)));
fileSystem = HadoopClientFactory.get().createFalconFileSystem(storePath.toUri());
String isSafeMode = (doesSafemodeFileExist()) ? "true" : "false";
LOG.info("Initializing Falcon StartupProperties with safemode set to {}.", isSafeMode);
INSTANCE.get().setProperty(SAFEMODE_PROPERTY, isSafeMode);
}
return INSTANCE.get();
} catch (FalconException e) {
throw new RuntimeException("Unable to read application startup properties", e);
} catch (IOException e) {
throw new RuntimeException("Unable to verify Falcon safemode", e);
}
}

@@ -99,9 +99,11 @@ public static void main(String[] args) throws Exception {
boolean isSafeMode = Boolean.parseBoolean(cmd.getOptionValue(SAFE_MODE));
if (isSafeMode) {
StartupProperties.createSafemodeFile();
LOG.info("Falcon is starting in safemode.");
} else {
StartupProperties.deleteSafemodeFile();
}
StartupProperties.get().setProperty(StartupProperties.SAFEMODE_PROPERTY, Boolean.toString(isSafeMode));
}

final String enableTLSFlag = StartupProperties.get().getProperty("falcon.enableTLS");

0 comments on commit 39f64a0

Please sign in to comment.