org.apache.ignite.Ignition.start()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.apache.ignite.Ignition.start()方法的一些代码示例,展示了Ignition.start()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ignition.start()方法的具体详情如下:
包路径:org.apache.ignite.Ignition
类名称:Ignition
方法名:start

Ignition.start介绍

[英]Starts grid with default configuration. By default this method will use grid configuration defined in IGNITE_HOME/config/default-config.xmlconfiguration file. If such file is not found, then all system defaults will be used.
[中]使用默认配置启动网格。默认情况下,此方法将使用IGNITE_HOME/config/default config中定义的网格配置。xmlconfiguration文件。如果找不到该文件,则将使用所有系统默认值。

代码示例

代码示例来源:origin: apache/ignite

/**
 * Initializes the factory with provided a configuration under {@code springCfgPath} that is used to start up
 * an underlying {@link Ignite} instance.
 *
 * @param springCfgPath A path to Ignite configuration.
 */
public IgniteRepositoryFactory(String springCfgPath) {
  this.ignite = Ignition.start(springCfgPath);
}

代码示例来源:origin: apache/ignite

/**
 * Initializes the factory with provided a configuration under {@code springCfgPath} that is used to start up
 * an underlying {@link Ignite} instance.
 *
 * @param springCfgPath A path to Ignite configuration.
 */
public IgniteRepositoryFactory(String springCfgPath) {
  this.ignite = Ignition.start(springCfgPath);
}

代码示例来源:origin: apache/ignite

/**
 * Initializes the factory with provided {@link IgniteConfiguration} that is used to start up an underlying
 * {@link Ignite} instance.
 *
 * @param cfg Ignite configuration.
 */
public IgniteRepositoryFactory(IgniteConfiguration cfg) {
  this.ignite = Ignition.start(cfg);
}

代码示例来源:origin: apache/ignite

/**
   * Start a node.
   *
   * @param cfg Configuration.
   * @return Ignite instance.
   */
  private static Ignite ignitionStart(IgniteConfiguration cfg) {
    GridQueryProcessor.idxCls = BlockingIndexing.class;

    return Ignition.start(cfg);
  }
}

代码示例来源:origin: apache/ignite

@Override public Void call() throws Exception {
    Ignition.start(cfg);
    return null;
  }
}, IgniteException.class, "SQL schema name derived from cache name is reserved (please set explicit SQL " +

代码示例来源:origin: apache/ignite

@Override public Void call() throws Exception {
    Ignition.start(cfg);
    return null;
  }
}, IgniteException.class, "SQL schema name is reserved (please choose another one) [cacheName=CACHE, " +

代码示例来源:origin: apache/ignite

@Override public Void call() throws Exception {
    Ignition.start(cfg);
    return null;
  }
}, IgniteException.class, "SQL schema name is reserved (please choose another one) [cacheName=CACHE, " +

代码示例来源:origin: apache/ignite

@Override public Void call() throws Exception {
    Ignition.start(cfg);
    return null;
  }
}, IgniteException.class, "SQL schema name is reserved (please choose another one) [cacheName=CACHE, " +

代码示例来源:origin: apache/ignite

/**
 * Restore one of the failed nodes.
 */
public void restoreNode() {
  if (failedCfgs.isEmpty())
    throw new IllegalStateException("Cannot restore nodes in healthy cluster");
  NodeConfiguration nodeCfg = failedCfgs.get(rnd.nextInt(failedCfgs.size()));
  Ignite ignite = Ignition.start(getConfiguration(nodeCfg));
  srvs.add(ignite);
  failedCfgs.remove(nodeCfg);
}

代码示例来源:origin: apache/ignite

/**
 * Start topology.
 *
 * @return Client node.
 */
private static Ignite start() {
  int i = 0;
  for (; i < NODE_CNT; i++)
    Ignition.start(config(i, false));
  return Ignition.start(config(i, true));
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
  super.beforeTestsStarted();
  Ignition.start(serverConfiguration(0));
  Ignition.start(clientConfiguration(1));
  Ignition.start(serverConfiguration(2));
  Ignition.start(serverConfiguration(3));
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
  super.beforeTestsStarted();
  for (IgniteConfiguration cfg : configurations())
    Ignition.start(cfg);
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
  super.beforeTestsStarted();
  for (IgniteConfiguration cfg : configurations())
    Ignition.start(cfg);
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
  super.beforeTestsStarted();
  for (IgniteConfiguration cfg : configurations())
    Ignition.start(cfg);
}

代码示例来源:origin: apache/ignite

@Override public Object call() throws Exception {
    String cacheName = cacheName("Person");
    Ignition.start(clientConfiguration(5).setCacheConfiguration(new CacheConfiguration(cacheName)));
    return null;
  }
}, IgniteException.class, "Cache configuration mismatch (local cache was created via Ignite API, while " +

代码示例来源:origin: apache/ignite

/**
 * Starts {@link Ignite} instance accorging to given arguments.
 *
 * @param args Arguments.
 * @throws Exception If failed.
 */
public static void main(String[] args) throws Exception {
  X.println(GridJavaProcess.PID_MSG_PREFIX + U.jvmPid());
  X.println("Starting Ignite Node... Args=" + Arrays.toString(args));
  IgniteConfiguration cfg = readCfgFromFileAndDeleteFile(args[0]);
  ignite = Ignition.start(cfg);
}

代码示例来源:origin: apache/ignite

@Override public Object call() throws Exception {
    final CacheConfiguration cfg = cacheConfig("InSensitiveCache", true, Integer.class, Integer.class)
      .setSqlSchema("InsensitiveCache");
    final CacheConfiguration collisionCfg = cacheConfig("InsensitiveCache", true, Integer.class, Integer.class)
      .setSqlSchema("Insensitivecache");
    IgniteConfiguration icfg = new IgniteConfiguration()
      .setLocalHost("127.0.0.1")
      .setCacheConfiguration(cfg, collisionCfg);
    Ignition.start(icfg);
    return null;
  }
}, IgniteException.class, "Duplicate index name");

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
  beforeHadoopCommandLineTest();
  String cfgPath = "config/hadoop/default-config.xml";
  IgniteBiTuple<IgniteConfiguration, GridSpringResourceContext> tup = IgnitionEx.loadConfiguration(cfgPath);
  IgniteConfiguration cfg = tup.get1();
  cfg.setLocalHost("127.0.0.1"); // Avoid connecting to other nodes.
  igfs = (IgfsEx) Ignition.start(cfg).fileSystem(igfsName);
}

代码示例来源:origin: apache/ignite

@Override public Object call() throws Exception {
    final CacheConfiguration cfg = cacheConfig("cache1", true, Integer.class, Fact.class)
      .setSqlSchema("TEST_SCHEMA");
    final CacheConfiguration collisionCfg = cacheConfig("cache2", true, Integer.class, Fact.class)
      .setSqlSchema("TEST_SCHEMA");
    IgniteConfiguration icfg = new IgniteConfiguration()
      .setLocalHost("127.0.0.1")
      .setCacheConfiguration(cfg, collisionCfg);
    Ignition.start(icfg);
    return null;
  }
}, IgniteException.class, "Failed to register query type");

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected void beforeTestsStarted() throws Exception {
  super.beforeTestsStarted();
  for (IgniteConfiguration cfg : configurations())
    Ignition.start(cfg);
  client().addCacheConfiguration(cacheConfiguration());
  client().addCacheConfiguration(cacheConfiguration().setName(CACHE_NAME + "_async")
    .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC));
  client().addCacheConfiguration(cacheConfiguration().setName(CACHE_NAME_BACKUPS).setBackups(DFLT_BACKUPS));
}

相关文章