@Override protected void setupObservers(FluoConfiguration fc) { List<org.apache.fluo.api.config.ObserverSpecification> observers = new ArrayList<>(); observers.add( new org.apache.fluo.api.config.ObserverSpecification(ConfigurableObserver.class.getName(), newMap("observedCol", "fam1:col1:" + NotificationType.STRONG, "outputCQ", "col2"))); observers.add( new org.apache.fluo.api.config.ObserverSpecification(ConfigurableObserver.class.getName(), newMap("observedCol", "fam1:col2:" + NotificationType.STRONG, "outputCQ", "col3", "setWeakNotification", "true"))); observers.add( new org.apache.fluo.api.config.ObserverSpecification(ConfigurableObserver.class.getName(), newMap("observedCol", "fam1:col3:" + NotificationType.WEAK, "outputCQ", "col4"))); fc.addObservers(observers); }
/** * Overriden so that no Observers will be started. This ensures whatever * statements are inserted as part of the test will not be consumed. */ @Override protected void preFluoInitHook() throws Exception { // Setup the observers that will be used by the Fluo PCJ Application. final List<ObserverSpecification> observers = new ArrayList<>(); // Add the observers to the Fluo Configuration. super.getFluoConfiguration().addObservers(observers); }
/** * Add info about the Kafka queue/topic to receive the export. */ @Override protected void preFluoInitHook() throws Exception { // Setup the observers that will be used by the Fluo PCJ Application. final List<ObserverSpecification> observers = new ArrayList<>(); observers.add(new ObserverSpecification(TripleObserver.class.getName())); observers.add(new ObserverSpecification(BatchObserver.class.getName())); observers.add(new ObserverSpecification(StatementPatternObserver.class.getName())); observers.add(new ObserverSpecification(JoinObserver.class.getName())); observers.add(new ObserverSpecification(FilterObserver.class.getName())); observers.add(new ObserverSpecification(AggregationObserver.class.getName())); observers.add(new ObserverSpecification(ProjectionObserver.class.getName())); observers.add(new ObserverSpecification(ConstructQueryResultObserver.class.getName())); // Configure the export observer to export new PCJ results to the mini // accumulo cluster. final HashMap<String, String> exportParams = new HashMap<>(); final KafkaBindingSetExporterParameters kafkaParams = new KafkaBindingSetExporterParameters(exportParams); kafkaParams.setUseKafkaBindingSetExporter(true); kafkaParams.setKafkaBootStrapServers(BROKERHOST + ":" + BROKERPORT); final KafkaSubGraphExporterParameters kafkaConstructParams = new KafkaSubGraphExporterParameters(exportParams); kafkaConstructParams.setUseKafkaSubgraphExporter(true); final ObserverSpecification exportObserverConfig = new ObserverSpecification(QueryResultObserver.class.getName(), exportParams); observers.add(exportObserverConfig); // Add the observers to the Fluo Configuration. super.getFluoConfiguration().addObservers(observers); }
/** * Add info about the Kafka queue/topic to receive the export. */ @Override protected void preFluoInitHook() throws Exception { // Setup the observers that will be used by the Fluo PCJ Application. final List<ObserverSpecification> observers = new ArrayList<>(); observers.add(new ObserverSpecification(TripleObserver.class.getName())); observers.add(new ObserverSpecification(BatchObserver.class.getName())); observers.add(new ObserverSpecification(StatementPatternObserver.class.getName())); observers.add(new ObserverSpecification(JoinObserver.class.getName())); observers.add(new ObserverSpecification(FilterObserver.class.getName())); observers.add(new ObserverSpecification(AggregationObserver.class.getName())); observers.add(new ObserverSpecification(ProjectionObserver.class.getName())); observers.add(new ObserverSpecification(ConstructQueryResultObserver.class.getName())); // Configure the export observer to export new PCJ results to the mini // accumulo cluster. final HashMap<String, String> exportParams = new HashMap<>(); final KafkaBindingSetExporterParameters kafkaParams = new KafkaBindingSetExporterParameters(exportParams); kafkaParams.setUseKafkaBindingSetExporter(true); kafkaParams.setKafkaBootStrapServers(BROKERHOST + ":" + BROKERPORT); final KafkaSubGraphExporterParameters kafkaConstructParams = new KafkaSubGraphExporterParameters(exportParams); kafkaConstructParams.setUseKafkaSubgraphExporter(true); final ObserverSpecification exportObserverConfig = new ObserverSpecification(QueryResultObserver.class.getName(), exportParams); observers.add(exportObserverConfig); // Add the observers to the Fluo Configuration. super.getFluoConfiguration().addObservers(observers); }
@Override protected void preFluoInitHook() throws Exception { // Setup the observers that will be used by the Fluo PCJ Application. final List<ObserverSpecification> observers = new ArrayList<>(); observers.add(new ObserverSpecification(BatchObserver.class.getName())); observers.add(new ObserverSpecification(TripleObserver.class.getName())); observers.add(new ObserverSpecification(StatementPatternObserver.class.getName())); observers.add(new ObserverSpecification(JoinObserver.class.getName())); observers.add(new ObserverSpecification(FilterObserver.class.getName())); observers.add(new ObserverSpecification(AggregationObserver.class.getName())); observers.add(new ObserverSpecification(PeriodicQueryObserver.class.getName())); observers.add(new ObserverSpecification(ProjectionObserver.class.getName())); // Configure the export observer to export new PCJ results to the mini accumulo cluster. final HashMap<String, String> exportParams = new HashMap<>(); final RyaExportParameters ryaParams = new RyaExportParameters(exportParams); ryaParams.setUseRyaBindingSetExporter(true); ryaParams.setUsePeriodicBindingSetExporter(true); ryaParams.setRyaInstanceName(getRyaInstanceName()); ryaParams.setAccumuloInstanceName(super.getMiniAccumuloCluster().getInstanceName()); ryaParams.setZookeeperServers(super.getMiniAccumuloCluster().getZooKeepers()); ryaParams.setExporterUsername(getUsername()); ryaParams.setExporterPassword(getPassword()); final ObserverSpecification exportObserverConfig = new ObserverSpecification(QueryResultObserver.class.getName(), exportParams); observers.add(exportObserverConfig); // Add the observers to the Fluo Configuration. super.getFluoConfiguration().addObservers(observers); }
@Override protected void preFluoInitHook() throws Exception { // Setup the observers that will be used by the Fluo PCJ Application. final List<ObserverSpecification> observers = new ArrayList<>(); observers.add(new ObserverSpecification(BatchObserver.class.getName())); observers.add(new ObserverSpecification(TripleObserver.class.getName())); observers.add(new ObserverSpecification(StatementPatternObserver.class.getName())); observers.add(new ObserverSpecification(JoinObserver.class.getName())); observers.add(new ObserverSpecification(FilterObserver.class.getName())); observers.add(new ObserverSpecification(AggregationObserver.class.getName())); observers.add(new ObserverSpecification(PeriodicQueryObserver.class.getName())); observers.add(new ObserverSpecification(ProjectionObserver.class.getName())); // Configure the export observer to export new PCJ results to the mini accumulo cluster. final HashMap<String, String> exportParams = new HashMap<>(); final RyaExportParameters ryaParams = new RyaExportParameters(exportParams); ryaParams.setUseRyaBindingSetExporter(true); ryaParams.setUsePeriodicBindingSetExporter(true); ryaParams.setRyaInstanceName(getRyaInstanceName()); ryaParams.setAccumuloInstanceName(super.getMiniAccumuloCluster().getInstanceName()); ryaParams.setZookeeperServers(super.getMiniAccumuloCluster().getZooKeepers()); ryaParams.setExporterUsername(getUsername()); ryaParams.setExporterPassword(getPassword()); final ObserverSpecification exportObserverConfig = new ObserverSpecification(QueryResultObserver.class.getName(), exportParams); observers.add(exportObserverConfig); // Add the observers to the Fluo Configuration. super.getFluoConfiguration().addObservers(observers); }
config.setApplicationName("IntegrationTests"); config.setMiniDataDir(miniDataDir.getAbsolutePath()); config.addObservers(observers);
/** * Add info about the Kafka queue/topic to receive the export. * * @see org.apache.rya.indexing.pcj.fluo.ITBase#setExportParameters(java.util.HashMap) */ @Override protected void preFluoInitHook() throws Exception { // Setup the observers that will be used by the Fluo PCJ Application. final List<ObserverSpecification> observers = new ArrayList<>(); observers.add(new ObserverSpecification(TripleObserver.class.getName())); observers.add(new ObserverSpecification(StatementPatternObserver.class.getName())); observers.add(new ObserverSpecification(JoinObserver.class.getName())); observers.add(new ObserverSpecification(FilterObserver.class.getName())); observers.add(new ObserverSpecification(AggregationObserver.class.getName())); observers.add(new ObserverSpecification(ProjectionObserver.class.getName())); observers.add(new ObserverSpecification(ConstructQueryResultObserver.class.getName())); // Configure the export observer to export new PCJ results to the mini // accumulo cluster. final HashMap<String, String> exportParams = new HashMap<>(); final KafkaSubGraphExporterParameters kafkaParams = new KafkaSubGraphExporterParameters(exportParams); kafkaParams.setUseKafkaSubgraphExporter(true); kafkaParams.setKafkaBootStrapServers(BROKERHOST + ":" + BROKERPORT); final ObserverSpecification exportObserverConfig = new ObserverSpecification(QueryResultObserver.class.getName(), exportParams); observers.add(exportObserverConfig); // Add the observers to the Fluo Configuration. super.getFluoConfiguration().addObservers(observers); }
config.setAccumuloTable("fluo" + fluoAppName); config.addObservers(observers);