carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...
Date Thu, 23 Feb 2017 11:23:20 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102692467
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/client/DictionaryClientHandler.java
---
    @@ -77,20 +79,13 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent
e) throws
        */
       public DictionaryKey getDictionary(DictionaryKey key) {
         DictionaryKey dictionaryKey;
    -    BlockingQueue<DictionaryKey> dictKeyQueue = null;
         try {
    -      synchronized (lock) {
    -        dictKeyQueue = dictKeyQueueMap.get(key.getThreadNo());
    -        if (dictKeyQueue == null) {
    -          dictKeyQueue = new LinkedBlockingQueue<DictionaryKey>();
    -          dictKeyQueueMap.put(key.getThreadNo(), dictKeyQueue);
    -        }
    -      }
    -      byte[] serialize = KryoRegister.serialize(key);
    -      ctx.getChannel().write(serialize);
    +      ByteBuf buffer = ctx.alloc().buffer();
    +      key.writeData(buffer);
    +      ctx.writeAndFlush(buffer);
         } catch (Exception e) {
    -      LOGGER.error("Error while send request to server " + e.getMessage());
    -      ctx.getChannel().close();
    +      LOGGER.error(e, "Error while send request to server " + e.getMessage());
    +      ctx.close();
         }
         boolean interrupted = false;
         try {
    --- End diff --
    
    Ok, timeout is handled in current code


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message