Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/334#discussion_r86012812
--- Diff:
metron-analytics/metron-profiler-client/src/test/java/org/apache/metron/profiler/client/ProfileWriter.java
---
@@ -95,4 +102,22 @@ private void write(ProfileMeasurement m, List<Object>
groups) {
hbaseClient.mutate();
}
+ public static void main(String[] args) throws Exception {
+ RowKeyBuilder rowKeyBuilder = new SaltyRowKeyBuilder();
+ ColumnBuilder columnBuilder = new ValueOnlyColumnBuilder();
+
+ Configuration config = HBaseConfiguration.create();
+ config.set("hbase.master.hostname", "node1");
+ config.set("hbase.regionserver.hostname", "node1");
+ config.set("hbase.zookeeper.quorum", "node1");
+
+ HTableProvider provider = new HTableProvider();
+ HTableInterface table = provider.getTable(config, "profiler");
+
+ long when = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(2);
+ ProfileMeasurement measure = new ProfileMeasurement("profile1",
"192.168.66.121", when, 15, TimeUnit.MINUTES);
--- End diff --
This doesn't actually run as part of the tests and does not consume 15
minutes. So many times I've had to load up profile data for demo purposes.
This main() function just provides a simple means to load up a bunch of profile
data in a single shot.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---