ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nragon <nuno.goncal...@wedotechnologies.com>
Subject Re: Client near cache with Apache Flink
Date Wed, 05 Apr 2017 13:52:18 GMT
So, when flink as to process the first record it creates a latch telling the
other task managers(jvm) to wait until the cache is loaded.

//
--------------------------------------------------------------------------------------------

      Ignite ignite = IgniteClient.ignite();
      IgniteCountDownLatch latch =
ignite.countDownLatch(this.cacheConfig.getName() + "-loadlatch", 1, false,
true);
      if (!cacheExists(ignite)) {
        ignite.getOrCreateCache(this.cacheConfig, this.nearCacheConfig);
        load(ignite);
        latch.countDown();
      }
      latch.await();
      this.nearCache =
ignite.getOrCreateNearCache(this.cacheConfig.getName(),
this.nearCacheConfig);
    } catch (Exception var3) {
      System.out.println(var3);
    }

//
--------------------------------------------------------------------------------------------

As testing purposes I'm calling the function for lookup but with fixed
Object[] when the key is TEST123

//
--------------------------------------------------------------------------------------------

    if(key.contains("TEST123")){
      this.matchRow = new Object[]{1, 1, 1};
    }
    else{
      this.matchRow = this.nearCache.get(key);
    }

//
--------------------------------------------------------------------------------------------

If I access ignite with this.nearCache.get(key) it drops my throughtput like
i mentioned before.
Let me know if more information is needed.

Thanks




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-near-cache-with-Apache-Flink-tp11627p11754.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message