Java Code Examples for org.apache.hadoop.yarn.conf.YarnConfiguration#DEFAULT_SCM_STORE_CLASS

The following examples show how to use org.apache.hadoop.yarn.conf.YarnConfiguration#DEFAULT_SCM_STORE_CLASS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SharedCacheManager.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private static SCMStore createSCMStoreService(Configuration conf) {
  Class<? extends SCMStore> defaultStoreClass;
  try {
    defaultStoreClass =
        (Class<? extends SCMStore>) Class
            .forName(YarnConfiguration.DEFAULT_SCM_STORE_CLASS);
  } catch (Exception e) {
    throw new YarnRuntimeException("Invalid default scm store class"
        + YarnConfiguration.DEFAULT_SCM_STORE_CLASS, e);
  }

  SCMStore store =
      ReflectionUtils.newInstance(conf.getClass(
          YarnConfiguration.SCM_STORE_CLASS,
          defaultStoreClass, SCMStore.class), conf);
  return store;
}
 
Example 2
Source File: SharedCacheManager.java    From big-c with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private static SCMStore createSCMStoreService(Configuration conf) {
  Class<? extends SCMStore> defaultStoreClass;
  try {
    defaultStoreClass =
        (Class<? extends SCMStore>) Class
            .forName(YarnConfiguration.DEFAULT_SCM_STORE_CLASS);
  } catch (Exception e) {
    throw new YarnRuntimeException("Invalid default scm store class"
        + YarnConfiguration.DEFAULT_SCM_STORE_CLASS, e);
  }

  SCMStore store =
      ReflectionUtils.newInstance(conf.getClass(
          YarnConfiguration.SCM_STORE_CLASS,
          defaultStoreClass, SCMStore.class), conf);
  return store;
}