Github user AromalAS commented on the pull request:

    
https://github.com/apache/incubator-metron/commit/ab8163bcc64d4b725ad61a5f6d8a74aad812a24a#commitcomment-17662283
  
    While testing the ThreatIntelAdapter in my devlopment area,
    I have to add zookeeper configuration also in the configuration file to 
make it work.
    
    I have done below changes . Please confirm whether this code changes is 
absolutely necessary ?.
    
    Similar changes were done for the SimpleHBaseAdapter as well
    
    Remote.yaml
    ============
    
     -   id: "simpleHBaseThreatIntelConfig"
            className: 
"org.apache.metron.enrichment.adapters.threatintel.ThreatIntelConfig"
            configMethods:
        
                -   name: "withQuorum"
                    args:
                        - "${zk.ips}"
                -   name: "withZkclientPort"
                    args:
                        - "${zk.port}"      
    
    ThreatIntelConfig.java
    =========================
    
     private String quorum;
      
      private String zkclientPort;
      
      public String getQuorum() {
                return quorum;
        }
        public void withQuorum(String quorum) {
                this.quorum = quorum;
        }
        public String getZkclientPort() {
                return zkclientPort;
        }
        public void  withZkclientPort(String zkclientPort) {
                this.zkclientPort = zkclientPort;
        }
    
    ThreatIntelAdapter.java 
    ==========================
    
    
     @Override
      public boolean initializeAdapter() {
        PersistentAccessTracker accessTracker;
        String hbaseTable = config.getHBaseTable();
        int expectedInsertions = config.getExpectedInsertions();
        double falsePositives = config.getFalsePositiveRate();
        String trackerHBaseTable = config.getTrackerHBaseTable();
        String trackerHBaseCF = config.getTrackerHBaseCF();
        long millisecondsBetweenPersist = 
config.getMillisecondsBetweenPersists();
        BloomAccessTracker bat = new BloomAccessTracker(hbaseTable, 
expectedInsertions, falsePositives);
        Configuration hbaseConfig = HBaseConfiguration.create();
    //added the below lines 
        hbaseConfig.set("hbase.zookeeper.quorum", config.getQuorum());
        hbaseConfig.set("hbase.zookeeper.property.clientPort", 
config.getZkclientPort());
    
    
    } 


---
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.
---

Reply via email to