Package net.myrrix.web

Examples of net.myrrix.web.RunnerConfiguration


      Files.copy(savedModelFile, new File(tempDir, "model.bin.gz"));
    }

    log.info("Configuring recommender...");

    RunnerConfiguration runnerConfig = new RunnerConfiguration();
    runnerConfig.setInstanceID("test");
    runnerConfig.setPort(8090); // Odd ports to avoid conflicts
    if (useSecurity()) {
      runnerConfig.setSecurePort(8453); // Odd ports to avoid conflicts
      runnerConfig.setKeystorePassword("changeit");
      runnerConfig.setKeystoreFile(new File("testdata/keystore"));
      runnerConfig.setUserName("foo");
      runnerConfig.setPassword("bar");
    }
    runnerConfig.setLocalInputDir(tempDir);

    runner = new Runner(runnerConfig);
    runner.call();

    boolean clientSecure = runnerConfig.getKeystoreFile() != null;
    int clientPort = clientSecure ? runnerConfig.getSecurePort() : runnerConfig.getPort();
    MyrrixClientConfiguration clientConfig = new MyrrixClientConfiguration();
    clientConfig.setHost("localhost");
    clientConfig.setPort(clientPort);
    clientConfig.setSecure(clientSecure);
    clientConfig.setKeystorePassword(runnerConfig.getKeystorePassword());
    clientConfig.setKeystoreFile(runnerConfig.getKeystoreFile());
    clientConfig.setUserName(runnerConfig.getUserName());
    clientConfig.setPassword(runnerConfig.getPassword());
    client = new ClientRecommender(clientConfig);

    if (callAwait()) {
      log.info("Waiting for client...");
      client.await();
View Full Code Here

TOP

Related Classes of net.myrrix.web.RunnerConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.