Ejemplo n.º 1
0
 private void sleep() {
   try {
     Thread.sleep(resolution);
   } catch (InterruptedException e) {
     log.warn(ZorkaLogger.ZAG_WARNINGS, "Hiccup-meter thread encountered interruption. ");
   }
 }
Ejemplo n.º 2
0
  @Override
  public Map<String, Object> process(Map<String, Object> record) {
    Object val = ObjectInspector.get(record.get(srcField), attrChain);

    if (ZorkaLogger.isLogLevel(ZorkaLogger.ZSP_ARGPROC)) {
      log.debug(ZorkaLogger.ZSP_ARGPROC, "Final result: '" + val + "' stored to slot " + dstField);
    }

    record.put(dstField, val);

    return record;
  }
Ejemplo n.º 3
0
 private void dskCycle(long t) {
   FileOutputStream os = null;
   try {
     os = new FileOutputStream(path);
     os.write(
         new byte[] {
           bt(t, 56), bt(t, 48), bt(t, 40), bt(t, 32), bt(t, 24), bt(t, 16), bt(t, 8), bt(t, 0)
         });
     os.flush();
     os.getFD().sync();
   } catch (FileNotFoundException e) {
     log.error(ZorkaLogger.ZAG_ERRORS, "Cannot perform disk test", e);
   } catch (IOException e) {
     log.error(ZorkaLogger.ZAG_ERRORS, "Cannot perform disk test", e);
   } finally {
     if (os != null) {
       try {
         os.close();
       } catch (IOException e) {
       }
     }
   }
 }