addressed raman's review comments
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/algebra/operators/physical/InvertedIndexPOperator.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/algebra/operators/physical/InvertedIndexPOperator.java
index 792375e..48f9e36 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/algebra/operators/physical/InvertedIndexPOperator.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/algebra/operators/physical/InvertedIndexPOperator.java
@@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.List;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixStorageProperties;
import edu.uci.ics.asterix.common.context.AsterixRuntimeComponentsProvider;
import edu.uci.ics.asterix.common.dataflow.IAsterixApplicationContextInfo;
@@ -198,8 +198,7 @@
searchModifierType, searchKeyType, secondaryIndex);
IIndexDataflowHelperFactory dataflowHelperFactory;
- AsterixStorageProperties storageProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getStorageProperties();
+ AsterixStorageProperties storageProperties = AsterixAppContextInfo.getInstance().getStorageProperties();
if (!isPartitioned) {
dataflowHelperFactory = new LSMInvertedIndexDataflowHelperFactory(
AsterixRuntimeComponentsProvider.LSMINVERTEDINDEX_PROVIDER,
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java
index ff854d1..f769db3 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java
@@ -71,7 +71,7 @@
import edu.uci.ics.asterix.aql.expression.WriteStatement;
import edu.uci.ics.asterix.aql.expression.visitor.IAqlExpressionVisitor;
import edu.uci.ics.asterix.aql.util.FunctionUtils;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixMetadataProperties;
import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
import edu.uci.ics.asterix.common.exceptions.AsterixException;
@@ -289,8 +289,7 @@
String outputDir = System.getProperty("java.io.tmpDir");
String filePath = outputDir + System.getProperty("file.separator") + OUTPUT_FILE_PREFIX
+ outputFileID.incrementAndGet();
- AsterixMetadataProperties metadataProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getMetadataProperties();
+ AsterixMetadataProperties metadataProperties = AsterixAppContextInfo.getInstance().getMetadataProperties();
return new FileSplit(metadataProperties.getMetadataNodeName(), new FileReference(new File(filePath)));
}
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
index c840ad2..438bc74 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
@@ -26,7 +26,7 @@
import edu.uci.ics.asterix.aql.expression.Query;
import edu.uci.ics.asterix.aql.expression.visitor.AQLPrintVisitor;
import edu.uci.ics.asterix.aql.rewrites.AqlRewriter;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixCompilerProperties;
import edu.uci.ics.asterix.common.config.OptimizationConfUtil;
import edu.uci.ics.asterix.common.exceptions.AsterixException;
@@ -258,8 +258,7 @@
}
}
- AsterixCompilerProperties compilerProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getCompilerProperties();
+ AsterixCompilerProperties compilerProperties = AsterixAppContextInfo.getInstance().getCompilerProperties();
int frameSize = compilerProperties.getFrameSize();
HeuristicCompilerFactoryBuilder builder = new HeuristicCompilerFactoryBuilder(
@@ -344,7 +343,7 @@
IJobletEventListenerFactory jobEventListenerFactory = new JobEventListenerFactory(asterixJobId,
isWriteTransaction);
- JobSpecification spec = compiler.createJob(AsterixAppContextInfoImpl.getInstance(), jobEventListenerFactory);
+ JobSpecification spec = compiler.createJob(AsterixAppContextInfo.getInstance(), jobEventListenerFactory);
if (pc.isPrintJob()) {
switch (pdf) {
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java
index 2173aea..25a2551 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/DatasetOperations.java
@@ -22,7 +22,7 @@
import java.util.logging.Logger;
import edu.uci.ics.asterix.api.common.Job;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixStorageProperties;
import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
import edu.uci.ics.asterix.common.config.GlobalConfig;
@@ -120,8 +120,7 @@
Pair<IFileSplitProvider, AlgebricksPartitionConstraint> splitsAndConstraint = metadataProvider
.splitProviderAndPartitionConstraintsForInternalOrFeedDataset(dataset.getDataverseName(), datasetName,
datasetName);
- AsterixStorageProperties storageProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getStorageProperties();
+ AsterixStorageProperties storageProperties = AsterixAppContextInfo.getInstance().getStorageProperties();
IndexDropOperatorDescriptor primaryBtreeDrop = new IndexDropOperatorDescriptor(specPrimary,
AsterixRuntimeComponentsProvider.NOINDEX_PROVIDER, AsterixRuntimeComponentsProvider.NOINDEX_PROVIDER,
splitsAndConstraint.first, new LSMBTreeDataflowHelperFactory(
@@ -167,8 +166,7 @@
}
LOGGER.info("CREATING File Splits: " + sb.toString());
- AsterixStorageProperties storageProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getStorageProperties();
+ AsterixStorageProperties storageProperties = AsterixAppContextInfo.getInstance().getStorageProperties();
//prepare a LocalResourceMetadata which will be stored in NC's local resource repository
ILocalResourceMetadata localResourceMetadata = new LSMBTreeLocalResourceMetadata(typeTraits,
comparatorFactories, blooFilterKeyFields, true, storageProperties.getMemoryComponentPageSize(),
@@ -264,8 +262,7 @@
numElementsHint = Long.parseLong(dataset.getHints().get("CARDINALITY"));
}
- AsterixStorageProperties storageProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getStorageProperties();
+ AsterixStorageProperties storageProperties = AsterixAppContextInfo.getInstance().getStorageProperties();
TreeIndexBulkLoadOperatorDescriptor btreeBulkLoad = new TreeIndexBulkLoadOperatorDescriptor(spec,
AsterixRuntimeComponentsProvider.NOINDEX_PROVIDER, AsterixRuntimeComponentsProvider.NOINDEX_PROVIDER,
splitsAndConstraint.first, typeTraits, comparatorFactories, blooFilterKeyFields, fieldPermutation,
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/IndexOperations.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/IndexOperations.java
index d1ba0f4..cec97ad 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/IndexOperations.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/IndexOperations.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.file;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixStorageProperties;
import edu.uci.ics.asterix.common.config.OptimizationConfUtil;
import edu.uci.ics.asterix.common.context.AsterixRuntimeComponentsProvider;
@@ -49,8 +49,7 @@
Pair<IFileSplitProvider, AlgebricksPartitionConstraint> splitsAndConstraint = metadataProvider
.splitProviderAndPartitionConstraintsForInternalOrFeedDataset(dataverseName, datasetName, indexName);
- AsterixStorageProperties storageProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getStorageProperties();
+ AsterixStorageProperties storageProperties = AsterixAppContextInfo.getInstance().getStorageProperties();
IndexDropOperatorDescriptor btreeDrop = new IndexDropOperatorDescriptor(spec,
AsterixRuntimeComponentsProvider.NOINDEX_PROVIDER, AsterixRuntimeComponentsProvider.NOINDEX_PROVIDER,
splitsAndConstraint.first, new LSMBTreeDataflowHelperFactory(
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/SecondaryIndexCreator.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/SecondaryIndexCreator.java
index 357c55e..83c9393 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/SecondaryIndexCreator.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/SecondaryIndexCreator.java
@@ -19,7 +19,7 @@
import java.io.IOException;
import java.util.List;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixStorageProperties;
import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
import edu.uci.ics.asterix.common.config.IAsterixPropertiesProvider;
@@ -117,8 +117,7 @@
public static SecondaryIndexCreator createIndexCreator(CompiledCreateIndexStatement createIndexStmt,
AqlMetadataProvider metadataProvider, PhysicalOptimizationConfig physOptConf) throws AsterixException,
AlgebricksException {
- IAsterixPropertiesProvider asterixPropertiesProvider = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance());
+ IAsterixPropertiesProvider asterixPropertiesProvider = AsterixAppContextInfo.getInstance();
SecondaryIndexCreator indexCreator = null;
switch (createIndexStmt.getIndexType()) {
case BTREE: {
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index d92e884..01cbca0 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -13,10 +13,9 @@
import edu.uci.ics.asterix.api.http.servlet.QueryResultAPIServlet;
import edu.uci.ics.asterix.api.http.servlet.QueryStatusAPIServlet;
import edu.uci.ics.asterix.api.http.servlet.UpdateAPIServlet;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixExternalProperties;
import edu.uci.ics.asterix.common.config.AsterixMetadataProperties;
-import edu.uci.ics.asterix.common.config.GlobalConfig;
import edu.uci.ics.asterix.metadata.MetadataManager;
import edu.uci.ics.asterix.metadata.api.IAsterixStateProxy;
import edu.uci.ics.asterix.metadata.bootstrap.AsterixStateProxy;
@@ -30,8 +29,6 @@
private static final String HYRACKS_CONNECTION_ATTR = "edu.uci.ics.asterix.HYRACKS_CONNECTION";
- private static final int DEFAULT_JSON_API_SERVER_PORT = 19101;
-
private Server webServer;
private Server jsonAPIServer;
private static IAsterixStateProxy proxy;
@@ -44,20 +41,18 @@
LOGGER.info("Starting Asterix cluster controller");
}
- AsterixAppContextInfoImpl.initialize(appCtx);
+ AsterixAppContextInfo.initialize(appCtx);
proxy = AsterixStateProxy.registerRemoteObject();
appCtx.setDistributedState(proxy);
- AsterixMetadataProperties metadataProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getMetadataProperties();
+ AsterixMetadataProperties metadataProperties = AsterixAppContextInfo.getInstance().getMetadataProperties();
MetadataManager.INSTANCE = new MetadataManager(proxy, metadataProperties);
- setupWebServer();
+ AsterixExternalProperties externalProperties = AsterixAppContextInfo.getInstance().getExternalProperties();
+ setupWebServer(externalProperties);
webServer.start();
-
- // Setup and start the web interface
- setupJSONAPIServer();
+ setupJSONAPIServer(externalProperties);
jsonAPIServer.start();
}
@@ -78,9 +73,8 @@
return new HyracksConnection(strIP, port);
}
- private void setupWebServer() throws Exception {
- AsterixExternalProperties externalProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getExternalProperties();
+ private void setupWebServer(AsterixExternalProperties externalProperties) throws Exception {
+
webServer = new Server(externalProperties.getWebInterfacePort());
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
@@ -93,13 +87,8 @@
context.addServlet(new ServletHolder(new APIServlet()), "/*");
}
- private void setupJSONAPIServer() throws Exception {
- String portStr = System.getProperty(GlobalConfig.JSON_API_SERVER_PORT_PROPERTY);
- int port = DEFAULT_JSON_API_SERVER_PORT;
- if (portStr != null) {
- port = Integer.parseInt(portStr);
- }
- jsonAPIServer = new Server(port);
+ private void setupJSONAPIServer(AsterixExternalProperties externalProperties) throws Exception {
+ jsonAPIServer = new Server(externalProperties.getAPIServerPort());
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
context.setContextPath("/");
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
index d29d92b..7dad984 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
@@ -90,16 +90,15 @@
AsterixMetadataProperties metadataProperties = runtimeContext.getMetadataProperties();
if (systemState == SystemState.NEW_UNIVERSE) {
- PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) runtimeContext
- .getLocalResourceRepository();
-
if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.info("nodeid" + nodeId);
- LOGGER.info("proxy" + proxy);
- LOGGER.info("stores" + metadataProperties.getStores());
- LOGGER.info("store" + metadataProperties.getStores().get(nodeId)[0]);
+ LOGGER.info("System state: " + SystemState.NEW_UNIVERSE);
+ LOGGER.info("Node ID: " + nodeId);
+ LOGGER.info("Stores: " + metadataProperties.getStores());
+ LOGGER.info("Root Metadata Store: " + metadataProperties.getStores().get(nodeId)[0]);
}
+ PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) runtimeContext
+ .getLocalResourceRepository();
localResourceRepository.initialize(nodeId, metadataProperties.getStores().get(nodeId)[0], true, null);
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixAppContextInfoImpl.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixAppContextInfo.java
similarity index 73%
rename from asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixAppContextInfoImpl.java
rename to asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixAppContextInfo.java
index c7393b9..06a1c1f 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixAppContextInfoImpl.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixAppContextInfo.java
@@ -35,37 +35,37 @@
* instances that are accessed from the NCs. In addition an instance of ICCApplicationContext
* is stored for access by the CC.
*/
-public class AsterixAppContextInfoImpl implements IAsterixApplicationContextInfo, IAsterixPropertiesProvider {
+public class AsterixAppContextInfo implements IAsterixApplicationContextInfo, IAsterixPropertiesProvider {
- private static AsterixAppContextInfoImpl INSTANCE;
+ private static AsterixAppContextInfo INSTANCE;
private final ICCApplicationContext appCtx;
- private static AsterixCompilerProperties compilerProperties;
- private static AsterixExternalProperties externalProperties;
- private static AsterixMetadataProperties metadataProperties;
- private static AsterixStorageProperties storageProperties;
- private static AsterixTransactionProperties txnProperties;
+ private AsterixCompilerProperties compilerProperties;
+ private AsterixExternalProperties externalProperties;
+ private AsterixMetadataProperties metadataProperties;
+ private AsterixStorageProperties storageProperties;
+ private AsterixTransactionProperties txnProperties;
public static void initialize(ICCApplicationContext ccAppCtx) throws AsterixException {
if (INSTANCE == null) {
- INSTANCE = new AsterixAppContextInfoImpl(ccAppCtx);
+ INSTANCE = new AsterixAppContextInfo(ccAppCtx);
}
AsterixPropertiesAccessor propertiesAccessor = new AsterixPropertiesAccessor();
- compilerProperties = new AsterixCompilerProperties(propertiesAccessor);
- externalProperties = new AsterixExternalProperties(propertiesAccessor);
- metadataProperties = new AsterixMetadataProperties(propertiesAccessor);
- storageProperties = new AsterixStorageProperties(propertiesAccessor);
- txnProperties = new AsterixTransactionProperties(propertiesAccessor);
+ INSTANCE.compilerProperties = new AsterixCompilerProperties(propertiesAccessor);
+ INSTANCE.externalProperties = new AsterixExternalProperties(propertiesAccessor);
+ INSTANCE.metadataProperties = new AsterixMetadataProperties(propertiesAccessor);
+ INSTANCE.storageProperties = new AsterixStorageProperties(propertiesAccessor);
+ INSTANCE.txnProperties = new AsterixTransactionProperties(propertiesAccessor);
- Logger.getLogger(".").setLevel(externalProperties.getLogLevel());
+ Logger.getLogger("edu.uci.ics").setLevel(INSTANCE.externalProperties.getLogLevel());
}
- private AsterixAppContextInfoImpl(ICCApplicationContext ccAppCtx) {
+ private AsterixAppContextInfo(ICCApplicationContext ccAppCtx) {
this.appCtx = ccAppCtx;
}
- public static IAsterixApplicationContextInfo getInstance() {
+ public static AsterixAppContextInfo getInstance() {
return INSTANCE;
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixCompilerProperties.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixCompilerProperties.java
index e1c80bd..b1767b9 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixCompilerProperties.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixCompilerProperties.java
@@ -2,10 +2,10 @@
public class AsterixCompilerProperties extends AbstractAsterixProperties {
private static final String COMPILER_SORTMEMORY_KEY = "compiler.sortmemory";
- private static final int COMPILER_SORTMEMORY_DEFAULT = (512 << 20); // 512MB
+ private static final long COMPILER_SORTMEMORY_DEFAULT = (512 << 20); // 512MB
private static final String COMPILER_JOINMEMORY_KEY = "compiler.joinmemory";
- private static final int COMPILER_JOINMEMORY_DEFAULT = (512 << 20); // 512MB
+ private static final long COMPILER_JOINMEMORY_DEFAULT = (512 << 20); // 512MB
private static final String COMPILER_FRAMESIZE_KEY = "compiler.framesize";
private static int COMPILER_FRAMESIZE_DEFAULT = (32 << 10); // 32KB
@@ -14,15 +14,18 @@
super(accessor);
}
- public int getSortMemorySize() {
- return accessor.getInt(COMPILER_SORTMEMORY_KEY, COMPILER_SORTMEMORY_DEFAULT);
+ public long getSortMemorySize() {
+ return accessor.getProperty(COMPILER_SORTMEMORY_KEY, COMPILER_SORTMEMORY_DEFAULT,
+ PropertyInterpreters.getLongPropertyInterpreter());
}
- public int getJoinMemorySize() {
- return accessor.getInt(COMPILER_JOINMEMORY_KEY, COMPILER_JOINMEMORY_DEFAULT);
+ public long getJoinMemorySize() {
+ return accessor.getProperty(COMPILER_JOINMEMORY_KEY, COMPILER_JOINMEMORY_DEFAULT,
+ PropertyInterpreters.getLongPropertyInterpreter());
}
public int getFrameSize() {
- return accessor.getInt(COMPILER_FRAMESIZE_KEY, COMPILER_FRAMESIZE_DEFAULT);
+ return accessor.getProperty(COMPILER_FRAMESIZE_KEY, COMPILER_FRAMESIZE_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixExternalProperties.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixExternalProperties.java
index 958aa7f..d82eb03 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixExternalProperties.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixExternalProperties.java
@@ -8,19 +8,27 @@
private static int EXTERNAL_WEBPORT_DEFAULT = 19001;
private static final String EXTERNAL_LOGLEVEL_KEY = "external.loglevel";
- private static String EXTERNAL_LOGLEVEL_DEFAULT = "INFO";
+ private static Level EXTERNAL_LOGLEVEL_DEFAULT = Level.INFO;
+
+ private static final String EXTERNAL_APISERVER_KEY = "external.apiserver";
+ private static int EXTERNAL_APISERVER_DEFAULT = 19101;
public AsterixExternalProperties(AsterixPropertiesAccessor accessor) {
super(accessor);
}
public int getWebInterfacePort() {
- return accessor.getInt(EXTERNAL_WEBPORT_KEY, EXTERNAL_WEBPORT_DEFAULT);
+ return accessor.getProperty(EXTERNAL_WEBPORT_KEY, EXTERNAL_WEBPORT_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
+ }
+
+ public int getAPIServerPort() {
+ return accessor.getProperty(EXTERNAL_APISERVER_KEY, EXTERNAL_APISERVER_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public Level getLogLevel() {
- String level = accessor.getString(EXTERNAL_LOGLEVEL_KEY, EXTERNAL_LOGLEVEL_DEFAULT);
- return Level.parse(level);
+ return accessor.getProperty(EXTERNAL_LOGLEVEL_KEY, EXTERNAL_LOGLEVEL_DEFAULT,
+ PropertyInterpreters.getLevelPropertyInterpreter());
}
-
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixPropertiesAccessor.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixPropertiesAccessor.java
index eeec537..d4f44f6 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixPropertiesAccessor.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixPropertiesAccessor.java
@@ -8,6 +8,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
@@ -19,11 +21,12 @@
import edu.uci.ics.asterix.common.exceptions.AsterixException;
public class AsterixPropertiesAccessor {
+ private static final Logger LOGGER = Logger.getLogger(AsterixPropertiesAccessor.class.getName());
private final String metadataNodeName;
private final Set<String> nodeNames;
private final Map<String, String[]> stores;
- private final Map<String, String> asterixConfigurationParams;
+ private final Map<String, Property> asterixConfigurationParams;
public AsterixPropertiesAccessor() throws AsterixException {
String fileName = System.getProperty(GlobalConfig.CONFIG_FILE_PROPERTY);
@@ -57,9 +60,9 @@
stores.put(store.getNcId(), trimmedStoreDirs.split(","));
nodeNames.add(store.getNcId());
}
- asterixConfigurationParams = new HashMap<String, String>();
+ asterixConfigurationParams = new HashMap<String, Property>();
for (Property p : asterixConfiguration.getProperty()) {
- asterixConfigurationParams.put(p.getName(), p.getValue());
+ asterixConfigurationParams.put(p.getName(), p);
}
}
@@ -79,13 +82,21 @@
return nodeNames;
}
- public int getInt(String property, int defaultValue) {
- String propertyValue = asterixConfigurationParams.get(property);
- return propertyValue == null ? defaultValue : Integer.parseInt(propertyValue);
+ public <T> T getProperty(String property, T defaultValue, IPropertyInterpreter<T> interpreter) {
+ Property p = asterixConfigurationParams.get(property);
+ try {
+ T interpretedValue = interpreter.interpret(p);
+ return interpretedValue == null ? defaultValue : interpretedValue;
+ } catch (IllegalArgumentException e) {
+ logConfigurationError(p, defaultValue);
+ throw e;
+ }
}
- public String getString(String property, String defaultValue) {
- String propertyValue = asterixConfigurationParams.get(property);
- return propertyValue == null ? defaultValue : propertyValue;
+ private <T> void logConfigurationError(Property p, T defaultValue) {
+ if (LOGGER.isLoggable(Level.SEVERE)) {
+ LOGGER.severe("Invalid property value '" + p.getValue() + "' for property '" + p.getName()
+ + "'.\n See the description: \n" + p.getDescription() + "\nDefault = " + defaultValue);
+ }
}
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java
index 1e41ce8..d34e4ac 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java
@@ -18,40 +18,55 @@
private static final int STORAGE_MEMORYCOMPONENT_NUMPAGES_DEFAULT = 4096; // ... so 128MB components
private static final String STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_KEY = "storage.memorycomponent.globalbudget";
- private static final int STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_DEFAULT = (1 << 30); // 1GB
+ private static final long STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_DEFAULT = (1 << 30); // 1GB
private static final String STORAGE_LSM_MERGETHRESHOLD_KEY = "storage.lsm.mergethreshold";
private static int STORAGE_LSM_MERGETHRESHOLD_DEFAULT = 3;
+ private static final String STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE_KEY = "storage.lsm.bloomfilter.falsepositiverate";
+ private static double STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE_DEFAULT = 0.01;
+
public AsterixStorageProperties(AsterixPropertiesAccessor accessor) {
super(accessor);
}
public int getBufferCachePageSize() {
- return accessor.getInt(STORAGE_BUFFERCACHE_PAGESIZE_KEY, STORAGE_BUFFERCACHE_PAGESIZE_DEFAULT);
+ return accessor.getProperty(STORAGE_BUFFERCACHE_PAGESIZE_KEY, STORAGE_BUFFERCACHE_PAGESIZE_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getBufferCacheNumPages() {
- return accessor.getInt(STORAGE_BUFFERCACHE_NUMPAGES_KEY, STORAGE_BUFFERCACHE_NUMPAGES_DEFAULT);
+ return accessor.getProperty(STORAGE_BUFFERCACHE_NUMPAGES_KEY, STORAGE_BUFFERCACHE_NUMPAGES_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getBufferCacheMaxOpenFiles() {
- return accessor.getInt(STORAGE_BUFFERCACHE_MAXOPENFILES_KEY, STORAGE_BUFFERCACHE_MAXOPENFILES_DEFAULT);
+ return accessor.getProperty(STORAGE_BUFFERCACHE_MAXOPENFILES_KEY, STORAGE_BUFFERCACHE_MAXOPENFILES_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getMemoryComponentPageSize() {
- return accessor.getInt(STORAGE_MEMORYCOMPONENT_PAGESIZE_KEY, STORAGE_MEMORYCOMPONENT_PAGESIZE_DEFAULT);
+ return accessor.getProperty(STORAGE_MEMORYCOMPONENT_PAGESIZE_KEY, STORAGE_MEMORYCOMPONENT_PAGESIZE_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getMemoryComponentNumPages() {
- return accessor.getInt(STORAGE_MEMORYCOMPONENT_NUMPAGES_KEY, STORAGE_MEMORYCOMPONENT_NUMPAGES_DEFAULT);
+ return accessor.getProperty(STORAGE_MEMORYCOMPONENT_NUMPAGES_KEY, STORAGE_MEMORYCOMPONENT_NUMPAGES_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
- public int getMemoryComponentGlobalBudget() {
- return accessor.getInt(STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_KEY, STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_DEFAULT);
+ public long getMemoryComponentGlobalBudget() {
+ return accessor.getProperty(STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_KEY,
+ STORAGE_MEMORYCOMPONENT_GLOBALBUDGET_DEFAULT, PropertyInterpreters.getLongPropertyInterpreter());
}
public int getLSMIndexMergeThreshold() {
- return accessor.getInt(STORAGE_LSM_MERGETHRESHOLD_KEY, STORAGE_LSM_MERGETHRESHOLD_DEFAULT);
+ return accessor.getProperty(STORAGE_LSM_MERGETHRESHOLD_KEY, STORAGE_LSM_MERGETHRESHOLD_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
+ }
+
+ public double getBloomFilterFalsePositiveRate() {
+ return accessor.getProperty(STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE_KEY,
+ STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE_DEFAULT, PropertyInterpreters.getDoublePropertyInterpreter());
}
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixTransactionProperties.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixTransactionProperties.java
index f001e37..d97e53b 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixTransactionProperties.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixTransactionProperties.java
@@ -8,7 +8,7 @@
private static final int TXN_LOG_BUFFER_PAGESIZE_DEFAULT = (128 << 10); // 128KB
private static final String TXN_LOG_PARTITIONSIZE_KEY = "txn.log.partitionsize";
- private static final int TXN_LOG_PARTITIONSIZE_DEFAULT = (2 << 30); // 2GB
+ private static final long TXN_LOG_PARTITIONSIZE_DEFAULT = (2 << 30); // 2GB
private static final String TXN_LOG_GROUPCOMMITINTERVAL_KEY = "txn.log.groupcommitinterval";
private static int TXN_LOG_GROUPCOMMITINTERVAL_DEFAULT = 200; // 200ms
@@ -30,35 +30,43 @@
}
public int getLogBufferNumPages() {
- return accessor.getInt(TXN_LOG_BUFFER_NUMPAGES_KEY, TXN_LOG_BUFFER_NUMPAGES_DEFAULT);
+ return accessor.getProperty(TXN_LOG_BUFFER_NUMPAGES_KEY, TXN_LOG_BUFFER_NUMPAGES_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getLogBufferPageSize() {
- return accessor.getInt(TXN_LOG_BUFFER_PAGESIZE_KEY, TXN_LOG_BUFFER_PAGESIZE_DEFAULT);
+ return accessor.getProperty(TXN_LOG_BUFFER_PAGESIZE_KEY, TXN_LOG_BUFFER_PAGESIZE_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
- public int getLogPartitionSize() {
- return accessor.getInt(TXN_LOG_PARTITIONSIZE_KEY, TXN_LOG_PARTITIONSIZE_DEFAULT);
+ public long getLogPartitionSize() {
+ return accessor.getProperty(TXN_LOG_PARTITIONSIZE_KEY, TXN_LOG_PARTITIONSIZE_DEFAULT,
+ PropertyInterpreters.getLongPropertyInterpreter());
}
public int getGroupCommitInterval() {
- return accessor.getInt(TXN_LOG_GROUPCOMMITINTERVAL_KEY, TXN_LOG_GROUPCOMMITINTERVAL_DEFAULT);
+ return accessor.getProperty(TXN_LOG_GROUPCOMMITINTERVAL_KEY, TXN_LOG_GROUPCOMMITINTERVAL_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getCheckpointLSNThreshold() {
- return accessor.getInt(TXN_LOG_CHECKPOINT_LSNTHRESHOLD_KEY, TXN_LOG_CHECKPOINT_LSNTHRESHOLD_DEFAULT);
+ return accessor.getProperty(TXN_LOG_CHECKPOINT_LSNTHRESHOLD_KEY, TXN_LOG_CHECKPOINT_LSNTHRESHOLD_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getCheckpointPollFrequency() {
- return accessor.getInt(TXN_LOG_CHECKPOINT_POLLFREQUENCY_KEY, TXN_LOG_CHECKPOINT_POLLFREQUENCY_DEFAULT);
+ return accessor.getProperty(TXN_LOG_CHECKPOINT_POLLFREQUENCY_KEY, TXN_LOG_CHECKPOINT_POLLFREQUENCY_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getEntityToDatasetLockEscalationThreshold() {
- return accessor.getInt(TXN_LOCK_ESCALATIONTHRESHOLD_KEY, TXN_LOCK_ESCALATIONTHRESHOLD_DEFAULT);
+ return accessor.getProperty(TXN_LOCK_ESCALATIONTHRESHOLD_KEY, TXN_LOCK_ESCALATIONTHRESHOLD_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
public int getLockManagerShrinkTimer() {
- return accessor.getInt(TXN_LOCK_SHRINKTIMER_KEY, TXN_LOCK_SHRINKTIMER_DEFAULT);
+ return accessor.getProperty(TXN_LOCK_SHRINKTIMER_KEY, TXN_LOCK_SHRINKTIMER_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
}
}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/IPropertyInterpreter.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/IPropertyInterpreter.java
new file mode 100644
index 0000000..2cabbe5
--- /dev/null
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/IPropertyInterpreter.java
@@ -0,0 +1,7 @@
+package edu.uci.ics.asterix.common.config;
+
+import edu.uci.ics.asterix.common.configuration.Property;
+
+public interface IPropertyInterpreter<T> {
+ public T interpret(Property p) throws IllegalArgumentException;
+}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/PropertyInterpreters.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/PropertyInterpreters.java
new file mode 100644
index 0000000..9ff5dee
--- /dev/null
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/PropertyInterpreters.java
@@ -0,0 +1,71 @@
+package edu.uci.ics.asterix.common.config;
+
+import java.util.logging.Level;
+
+import edu.uci.ics.asterix.common.configuration.Property;
+
+public class PropertyInterpreters {
+
+ public static IPropertyInterpreter<Integer> getIntegerPropertyInterpreter() {
+ return new IPropertyInterpreter<Integer>() {
+
+ @Override
+ public Integer interpret(Property p) throws IllegalArgumentException {
+ try {
+ return Integer.parseInt(p.getValue());
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ };
+ }
+
+ public static IPropertyInterpreter<Long> getLongPropertyInterpreter() {
+ return new IPropertyInterpreter<Long>() {
+
+ @Override
+ public Long interpret(Property p) throws IllegalArgumentException {
+ try {
+ return Long.parseLong(p.getValue());
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ };
+ }
+
+ public static IPropertyInterpreter<Level> getLevelPropertyInterpreter() {
+ return new IPropertyInterpreter<Level>() {
+
+ @Override
+ public Level interpret(Property p) throws IllegalArgumentException {
+ return Level.parse(p.getValue());
+ }
+ };
+ }
+
+ public static IPropertyInterpreter<String> getStringPropertyInterpreter() {
+ return new IPropertyInterpreter<String>() {
+
+ @Override
+ public String interpret(Property p) throws IllegalArgumentException {
+ return p.getValue();
+ }
+ };
+ }
+
+ public static IPropertyInterpreter<Double> getDoublePropertyInterpreter() {
+ return new IPropertyInterpreter<Double>() {
+
+ @Override
+ public Double interpret(Property p) throws IllegalArgumentException {
+ try {
+ return Double.parseDouble(p.getValue());
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ };
+ }
+
+}
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java
index f7c2a59..03e84ef 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/AsterixAppRuntimeContext.java
@@ -82,7 +82,7 @@
storageProperties = new AsterixStorageProperties(propertiesAccessor);
txnProperties = new AsterixTransactionProperties(propertiesAccessor);
- Logger.getLogger(".").setLevel(externalProperties.getLogLevel());
+ Logger.getLogger("edu.uci.ics").setLevel(externalProperties.getLogLevel());
fileMapManager = new AsterixFileMapManager();
ICacheMemoryAllocator allocator = new HeapBufferAllocator();
diff --git a/asterix-installer/src/main/resources/conf/asterix-configuration.xml b/asterix-installer/src/main/resources/conf/asterix-configuration.xml
index 9920ecf..acc8f39 100644
--- a/asterix-installer/src/main/resources/conf/asterix-configuration.xml
+++ b/asterix-installer/src/main/resources/conf/asterix-configuration.xml
@@ -17,7 +17,7 @@
<name>storage.buffercache.pagesize</name>
<value>32768</value>
<description>The page size in bytes for pages in the buffer cache.
- (Default = 32KB)
+ (Default = "32768" // 32KB)
</description>
</property>
@@ -25,7 +25,7 @@
<name>storage.buffercache.numpages</name>
<value>1024</value>
<description>The number of pages allocated to the disk buffer cache.
- (Default = 1024)
+ (Default = "1024")
</description>
</property>
@@ -33,7 +33,7 @@
<name>storage.buffercache.maxopenfiles</name>
<value>214748364</value>
<description>The maximum number of open files in the buffer cache.
- (Default = 214748364)
+ (Default = "214748364")
</description>
</property>
@@ -41,7 +41,7 @@
<name>storage.memorycomponent.pagesize</name>
<value>32768</value>
<description>The page size in bytes for pages allocated to memory
- components. (Default = 32KB)
+ components. (Default = "32768" // 32KB)
</description>
</property>
@@ -58,7 +58,7 @@
<value>1073741824</value>
<description>The total size of memory in bytes that the sum of all
open memory
- components cannot exceed. (Default = 1073741824 // 1GB)
+ components cannot exceed. (Default = "1073741824" // 1GB)
</description>
</property>
@@ -71,80 +71,120 @@
</property>
<property>
+ <name>storage.lsm.bloomfilter.falsepositiverate</name>
+ <value>0.01</value>
+ <description>The maximum acceptable false positive rate for bloom
+ filters associated with LSM indexes. (Default = "0.01" // 1%)
+ </description>
+ </property>
+
+ <property>
<name>txn.log.buffer.numpages</name>
<value>8</value>
- <description></description>
+ <description>The number of in-memory log buffer pages. (Default = "8")
+ </description>
</property>
<property>
<name>txn.log.buffer.pagesize</name>
<value>131072</value>
- <description></description>
+ <description>The size of pages in the in-memory log buffer. (Default =
+ "131072" // 128KB)
+ </description>
</property>
<property>
<name>txn.log.partitionsize</name>
<value>2147483648</value>
- <description></description>
+ <description>The maximum size of a log file partition allowed before
+ rotating the log to the next partition. (Default = "2147483648" //
+ 2GB)
+ </description>
</property>
<property>
<name>txn.log.groupcommitinterval</name>
<value>200</value>
- <description></description>
+ <description>The group commit wait time in milliseconds. (Default =
+ "200" // 2ms)
+ </description>
</property>
<property>
<name>txn.log.checkpoint.lsnthreshold</name>
<value>67108864</value>
- <description></description>
+ <description>The size of the window that the maximum LSN is allowed to
+ be ahead of the checkpoint LSN by. (Default = ""67108864" // 64M)
+ </description>
</property>
<property>
<name>txn.log.checkpoint.pollfrequency</name>
<value>120</value>
- <description></description>
+ <description>The time in seconds between that the checkpoint thread
+ waits between polls. (Default = "120" // 120s)
+ </description>
</property>
<property>
<name>txn.lock.escalationthreshold</name>
<value>1000</value>
- <description></description>
+ <description>The number of entity level locks that need to be acquired
+ before the locks are coalesced and escalated into a dataset level
+ lock. (Default = "1000")
+ </description>
</property>
<property>
<name>txn.lock.shrinktimer</name>
<value>120000</value>
- <description></description>
+ <description>The time in milliseconds to wait before deallocating
+ unused lock manager memory. (Default = "120000" // 120s)
+ </description>
</property>
<property>
<name>compiler.sortmemory</name>
<value>536870912</value>
- <description></description>
+ <description>The amount of memory in bytes given to sort operations.
+ (Default = "536870912" // 512mb)
+ </description>
</property>
<property>
<name>compiler.joinmemory</name>
<value>536870912</value>
- <description></description>
+ <description>The amount of memory in bytes given to join operations.
+ (Default = "536870912" // 512mb)
+ </description>
</property>
<property>
<name>compiler.framesize</name>
<value>32768</value>
- <description></description>
+ <description>The Hyracks frame size that the compiler configures per
+ job. (Default = "32768" // 32KB)
+ </description>
</property>
<property>
<name>external.webport</name>
<value>19001</value>
- <description></description>
+ <description>The port for the ASTERIX web interface. (Default = 19001)
+ </description>
+ </property>
+
+ <property>
+ <name>external.apiserver</name>
+ <value>19101</value>
+ <description>The port for the ASTERIX API server. (Default = 19101)
+ </description>
</property>
<property>
<name>external.loglevel</name>
<value>INFO</value>
- <description></description>
+ <description>The minimum log level to be displayed. (Default = INFO)
+ </description>
</property>
</asterixConfiguration>
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlCompiledMetadataDeclarations.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlCompiledMetadataDeclarations.java
index 51702a7..f79b9b7 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlCompiledMetadataDeclarations.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlCompiledMetadataDeclarations.java
@@ -22,7 +22,7 @@
import java.util.logging.Logger;
import edu.uci.ics.asterix.common.annotations.TypeDataGen;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixMetadataProperties;
import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
import edu.uci.ics.asterix.common.exceptions.AsterixException;
@@ -74,8 +74,7 @@
this.dataverseName = dataverseName;
this.outputFile = outputFile;
this.config = config;
- AsterixMetadataProperties metadataProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getMetadataProperties();
+ AsterixMetadataProperties metadataProperties = AsterixAppContextInfo.getInstance().getMetadataProperties();
if (stores == null && online) {
this.stores = metadataProperties.getStores();
} else {
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlMetadataProvider.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlMetadataProvider.java
index 87e2e58..fa42aed 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlMetadataProvider.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/declared/AqlMetadataProvider.java
@@ -23,8 +23,7 @@
import java.util.Map;
import java.util.logging.Logger;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
-import edu.uci.ics.asterix.common.config.AsterixMetadataProperties;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
import edu.uci.ics.asterix.common.config.AsterixStorageProperties;
import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
import edu.uci.ics.asterix.common.config.DatasetConfig.IndexType;
@@ -175,11 +174,8 @@
public AqlMetadataProvider(Dataverse defaultDataverse) {
this.defaultDataverse = defaultDataverse;
- AsterixMetadataProperties metadataProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl
- .getInstance()).getMetadataProperties();
- this.stores = metadataProperties.getStores();
- this.storageProperties = ((AsterixAppContextInfoImpl) AsterixAppContextInfoImpl.getInstance())
- .getStorageProperties();
+ this.stores = AsterixAppContextInfo.getInstance().getMetadataProperties().getStores();
+ this.storageProperties = AsterixAppContextInfo.getInstance().getStorageProperties();
}
public void setJobId(JobId jobId) {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixRuntimeUtil.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixRuntimeUtil.java
index 76f3301..e280b2e 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixRuntimeUtil.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/AsterixRuntimeUtil.java
@@ -23,7 +23,7 @@
import java.util.Map;
import java.util.Set;
-import edu.uci.ics.asterix.common.api.AsterixAppContextInfoImpl;
+import edu.uci.ics.asterix.common.api.AsterixAppContextInfo;
/**
* Utility class for obtaining information on the set of Hyracks NodeController
@@ -52,7 +52,7 @@
public static Map<String, Set<String>> getNodeControllerMap()
throws Exception {
Map<String, Set<String>> map = new HashMap<String, Set<String>>();
- AsterixAppContextInfoImpl.getInstance().getCCApplicationContext()
+ AsterixAppContextInfo.getInstance().getCCApplicationContext()
.getCCContext().getIPAddressNodeMap(map);
return map;
}