/** * Create a new node. It is not started by this method.<br> * This must be called before starting the tester. * * @param nodeName * the name of the node. Must be unique. */ public JqmAsyncTester addNode(String nodeName) { if (hasStarted) { throw new IllegalStateException("tester has already started"); } File resDirectoryPath = Common.createTempDirectory(); Node node = Node.create(cnx, nodeName, 12, resDirectoryPath.getAbsolutePath(), ".", resDirectoryPath.getAbsolutePath(), "test", logLevel); cnx.commit(); nodes.put(nodeName, node); setNodesLogLevel(logLevel); return this; }
/** * Create a new node. It is not started by this method.<br> * This must be called before starting the tester. * * @param nodeName * the name of the node. Must be unique. */ public JqmAsyncTester addNode(String nodeName) { if (hasStarted) { throw new IllegalStateException("tester has already started"); } File resDirectoryPath = Common.createTempDirectory(); Node node = Node.create(cnx, nodeName, 12, resDirectoryPath.getAbsolutePath(), ".", resDirectoryPath.getAbsolutePath(), "test", logLevel); cnx.commit(); nodes.put(nodeName, node); setNodesLogLevel(logLevel); return this; }
nodeId = Node.create(cnx, nodeName, port, System.getProperty("user.dir") + "/jobs/", System.getProperty("user.dir") + "/jobs/", System.getProperty("user.dir") + "/tmp/", "localhost", "INFO").getId(); cnx.commit();
nodeId = Node.create(cnx, nodeName, port, System.getProperty("user.dir") + "/jobs/", System.getProperty("user.dir") + "/jobs/", System.getProperty("user.dir") + "/tmp/", "localhost", "INFO").getId(); cnx.commit();
node = Node.create(cnx, "testtempnode", 12, resDirectoryPath.getAbsolutePath(), resDirectoryPath.getAbsolutePath(), resDirectoryPath.getAbsolutePath(), "test", "INFO");
node = Node.create(cnx, "testtempnode", 12, resDirectoryPath.getAbsolutePath(), resDirectoryPath.getAbsolutePath(), resDirectoryPath.getAbsolutePath(), "test", "INFO");
TestHelpers.node = Node.create(cnx, "localhost", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.node2 = Node.create(cnx, "localhost2", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.node3 = Node.create(cnx, "localhost3", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.nodeMix = Node.create(cnx, "localhost4", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.nodeMix2 = Node.create(cnx, "localhost5", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.node = Node.create(cnx, "localhost", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.node2 = Node.create(cnx, "localhost2", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.node3 = Node.create(cnx, "localhost3", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.nodeMix = Node.create(cnx, "localhost4", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG"); TestHelpers.nodeMix2 = Node.create(cnx, "localhost5", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
null, "Franquin", "ModuleMachin", "other", "other", false, cnx); Node n0 = Node.create(cnx, "n0", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n1 = Node.create(cnx, "n1", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n2 = Node.create(cnx, "n2", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n3 = Node.create(cnx, "n3", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n4 = Node.create(cnx, "n4", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n5 = Node.create(cnx, "n5", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n6 = Node.create(cnx, "n6", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n7 = Node.create(cnx, "n7", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n8 = Node.create(cnx, "n8", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO"); Node n9 = Node.create(cnx, "n9", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
public static void upsertNode(DbConn cnx, NodeDto dto) { if (dto.getId() != null) { QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(), dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory()); if (qr.nbUpdated != 1) { jqmlogger.debug("No update was done as object either does not exist or no modifications were done"); } } else { // Should actually never be used... nodes should be created through CLI. Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(), dto.getDns(), dto.getRootLogLevel()); } }
public static void upsertNode(DbConn cnx, NodeDto dto) { if (dto.getId() != null) { QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(), dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory()); if (qr.nbUpdated != 1) { jqmlogger.debug("No update was done as object either does not exist or no modifications were done"); } } else { // Should actually never be used... nodes should be created through CLI. Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(), dto.getDns(), dto.getRootLogLevel()); } }