@Override public void init() throws Exception { super.init(); noise = new ColtGaussian(mean, variance, seed); }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); this.in = new DataInputStream(getInputStream()); }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); this.in = new DataInputStream(getInputStream()); }
@Override public void init() throws Exception { super.init(); noise = new ColtGaussian(mean, variance, seed); }
/** * @see stream.io.Stream#init() */ @Override public void init() throws Exception { super.init(); attributes = new LinkedHashMap<String, Class<?>>(); if (encoding != null) reader = new BufferedReader(new InputStreamReader(getInputStream(), encoding)); else reader = new BufferedReader(new InputStreamReader(getInputStream())); }
/** * @see stream.io.Stream#init() */ @Override public void init() throws Exception { super.init(); attributes = new LinkedHashMap<String, Class<?>>(); if (encoding != null) reader = new BufferedReader(new InputStreamReader(getInputStream(), encoding)); else reader = new BufferedReader(new InputStreamReader(getInputStream())); }
@Override public void init() throws Exception { super.init(); if (attributes == null && generators.isEmpty()) { throw new Exception( "Parameter 'attributes' missing! This should be a list of mean,deviation pairs!"); } if (attributes != null) { int cnt = 1; for (int i = 0; i + 1 < attributes.length; i += 2) { setGenerator("x" + cnt, new Gaussian(attributes[i], attributes[i + 1])); cnt++; } } }
@Override public void init() throws Exception { super.init(); if (attributes == null && generators.isEmpty()) { throw new Exception( "Parameter 'attributes' missing! This should be a list of mean,deviation pairs!"); } if (attributes != null) { int cnt = 1; for (int i = 0; i + 1 < attributes.length; i += 2) { setGenerator("x" + cnt, new Gaussian(attributes[i], attributes[i + 1])); cnt++; } } }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); log.info("Creating poll thread..."); PollThread p = new PollThread(this); p.setDaemon(true); log.debug("starting poll thread"); p.start(); }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); for (String path : paths) { for (String probe : vmStats) { File f = new File(path + File.separator + probe); if (f.canExecute()) { vmstat = f; break; } } if (vmstat != null) break; } if (vmstat == null) { throw new Exception("Failed to locate vm_stat/vmstat utility!"); } String cmd = vmstat.getAbsolutePath(); Integer time = Math.max(1, interval.asSeconds().intValue()); process = Runtime.getRuntime().exec( new String[] { cmd, time.toString() }); reader = new BufferedReader(new InputStreamReader( process.getInputStream())); }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); for (String path : paths) { for (String probe : vmStats) { File f = new File(path + File.separator + probe); if (f.canExecute()) { vmstat = f; break; } } if (vmstat != null) break; } if (vmstat == null) { throw new Exception("Failed to locate vm_stat/vmstat utility!"); } String cmd = vmstat.getAbsolutePath(); Integer time = Math.max(1, interval.asSeconds().intValue()); process = Runtime.getRuntime().exec( new String[] { cmd, time.toString() }); reader = new BufferedReader(new InputStreamReader( process.getInputStream())); }
@Override public void init() throws Exception { super.init(); if (attributes == null && generators.isEmpty()) { throw new Exception( "Parameter 'attributes' missing! This should be a list of mean,deviation pairs!"); } if (attributes != null) { int cnt = 1; for (int i = 0; i + 1 < attributes.length; i += 2) { ColtGaussian cg = new ColtGaussian(attributes[i], attributes[i + 1], seed); setGenerator("x" + cnt, cg); cnt++; } } }
@Override public void init() throws Exception { super.init(); if (attributes == null && generators.isEmpty()) { throw new Exception( "Parameter 'attributes' missing! This should be a list of mean,deviation pairs!"); } if (attributes != null) { int cnt = 1; for (int i = 0; i + 1 < attributes.length; i += 2) { setGenerator("x" + cnt, new Gaussian(attributes[i], attributes[i + 1])); cnt++; } } }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); log.info("Creating poll thread..."); PollThread p = new PollThread(this); p.setDaemon(true); log.debug("starting poll thread"); p.start(); }
@Override public void init() throws Exception { super.init(); if (attributes == null && generators.isEmpty()) { throw new Exception( "Parameter 'attributes' missing! This should be a list of mean,deviation pairs!"); } if (attributes != null) { int cnt = 1; for (int i = 0; i + 1 < attributes.length; i += 2) { ColtGaussian cg = new ColtGaussian(attributes[i], attributes[i + 1], seed); setGenerator("x" + cnt, cg); cnt++; } } }
@Override public void init() throws Exception { super.init(); if (input == null) { input = this.getInputStream(); } reader = new ModSecurity2AuditReader(input); }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); try { log.info("Opening connection to database {}", getUrl()); connection = DriverManager.getConnection(getUrl(), getUsername(), getPassword()); PreparedStatement stmt = connection.prepareStatement(select); result = stmt.executeQuery(); } catch (Exception e) { log.error("Failed to connect to database: {}", e.getMessage()); e.printStackTrace(); } }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); try { log.info("Opening connection to database {}", getUrl()); SourceURL url = this.getUrl(); connection = DriverManager.getConnection(url.toString(), getUsername(), getPassword()); PreparedStatement stmt = connection.prepareStatement(select); result = stmt.executeQuery(); } catch (Exception e) { log.error("Failed to connect to database: {}", e.getMessage()); e.printStackTrace(); } }
/** * @see stream.io.AbstractStream#init() */ @Override public void init() throws Exception { super.init(); try { log.info("Opening connection to database {}", getUrl()); SourceURL url = this.getUrl(); connection = DriverManager.getConnection(url.toString(), getUsername(), getPassword()); PreparedStatement stmt = connection.prepareStatement(select); result = stmt.executeQuery(); } catch (Exception e) { log.error("Failed to connect to database: {}", e.getMessage()); e.printStackTrace(); } }