Package com.cloudera.flume.reporter.server.thrift

Examples of com.cloudera.flume.reporter.server.thrift.ThriftFlumeReport


        break;
      default:
        LOG.warn("Unknown type " + t);
      }
    }
    return new ThriftFlumeReport(stringMap, longMap, doubleMap);
  }
View Full Code Here


    ReportManager reportManager = ReportManager.get();
    Map<String, Reportable> reports = reportManager.getReportables();

    for (Entry<String, Reportable> e : reports.entrySet()) {
      ThriftFlumeReport report = reportToThrift(e.getValue().getMetrics());
      retMap.put(e.getKey(), report);
    }
    return retMap;
  }
View Full Code Here

    @Override
    public void putReports(Map<String, ThriftFlumeReport> reports) throws TException {
      Log.info("putReports called at server on " + this.port);
      assertEquals(1, reports.size());
      ThriftFlumeReport report = reports.get("reportKey");
      assertNotNull(report);

      Map<String, Long> longMetrics = report.longMetrics;
      assertEquals(2, longMetrics.size());
View Full Code Here

    ThriftFlumeReportServer.Client client = new ThriftFlumeReportServer.Client(
        protocol);
    Map<String, ThriftFlumeReport> ret = client.getAllReports();
    assertTrue(ret.size() == 1);
    ThriftFlumeReport rep = ret.get("reportable1");

    assertNotNull("Report 'reportable1' not found", rep);
    assertTrue("Expected exactly one double metric",
        rep.getDoubleMetricsSize() == 1);
    assertTrue("Expected double metric to be equal to 0.5", rep
        .getDoubleMetrics().get("doubleAttr") == 0.5);
  }
View Full Code Here

    TProtocol protocol = new TBinaryProtocol(transport);
    transport.open();
    ThriftFlumeReportServer.Client client = new ThriftFlumeReportServer.Client(
        protocol);

    ThriftFlumeReport rep = client.getReportByName("reportable1");

    assertNotNull("Report 'repotable1' not found", rep);
    assertTrue("Expected exactly one double metric",
        rep.getDoubleMetricsSize() == 1);
    assertTrue("Expected double metric to be equal to 0.5", rep
        .getDoubleMetrics().get("doubleAttr") == 0.5);
  }
View Full Code Here

    @Override
    public void putReports(Map<String, ThriftFlumeReport> reports)
        throws TException {
      Log.info("putReports called at server on " + this.port);
      assertEquals(1, reports.size());
      ThriftFlumeReport report = reports.get("reportKey");
      assertNotNull(report);

      Map<String, Long> longMetrics = report.longMetrics;
      assertEquals(2, longMetrics.size());
View Full Code Here

    ThriftFlumeReportServer.Client client = new ThriftFlumeReportServer.Client(
        protocol);
    Map<String, ThriftFlumeReport> ret = client.getAllReports();
    assertTrue(ret.size() == 1);
    ThriftFlumeReport rep = ret.get("reportable1");

    assertNotNull("Report 'reportable1' not found", rep);
    assertTrue("Expected exactly one double metric",
        rep.getDoubleMetricsSize() == 1);
    assertTrue("Expected double metric to be equal to 0.5", rep
        .getDoubleMetrics().get("doubleAttr") == 0.5);
  }
View Full Code Here

    TProtocol protocol = new TBinaryProtocol(transport);
    transport.open();
    ThriftFlumeReportServer.Client client = new ThriftFlumeReportServer.Client(
        protocol);

    ThriftFlumeReport rep = client.getReportByName("reportable1");

    assertNotNull("Report 'repotable1' not found", rep);
    assertTrue("Expected exactly one double metric",
        rep.getDoubleMetricsSize() == 1);
    assertTrue("Expected double metric to be equal to 0.5", rep
        .getDoubleMetrics().get("doubleAttr") == 0.5);
  }
View Full Code Here

        break;
      default:
        LOG.warn("Unknown type " + t);
      }
    }
    return new ThriftFlumeReport(stringMap, longMap, doubleMap);
  }
View Full Code Here

    ReportManager reportManager = ReportManager.get();
    Map<String, Reportable> reports = reportManager.getReportables();

    for (Entry<String, Reportable> e : reports.entrySet()) {
      ThriftFlumeReport report = reportToThrift(e.getValue().getReport());
      retMap.put(e.getKey(), report);
    }
    return retMap;
  }
View Full Code Here

TOP

Related Classes of com.cloudera.flume.reporter.server.thrift.ThriftFlumeReport

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.