[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102692574
 
    --- 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 --
   
    I am not sure about SettingFuture, but i don't see difference between blocking Queue and SettingFuture.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102692740
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/generator/key/DictionaryKey.java ---
    @@ -16,12 +16,12 @@
      */
     package org.apache.carbondata.core.dictionary.generator.key;
     
    -import java.io.Serializable;
    +import io.netty.buffer.ByteBuf;
     
     /**
      * Dictionary key to generate dictionary
      */
    -public class DictionaryKey implements Serializable {
    +public class DictionaryKey {
    --- End diff --
   
    Ok, but added in same object to avoid other unnecessary copying of metadata from request to response  


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102692767
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/generator/key/DictionaryKeyType.java ---
    @@ -0,0 +1,38 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.dictionary.generator.key;
    +
    +/**
    + * Dictionary key types.
    + */
    +public enum DictionaryKeyType {
    --- End diff --
   
    Ok, updated


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102692785
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/server/DictionaryServer.java ---
    @@ -42,38 +38,40 @@
       private static final LogService LOGGER =
               LogServiceFactory.getLogService(DictionaryServer.class.getName());
     
    -  private ServerBootstrap bootstrap;
    -
       private DictionaryServerHandler dictionaryServerHandler;
     
    +  private EventLoopGroup boss;
    +  private EventLoopGroup worker;
    +
       /**
        * start dictionary server
        *
        * @param port
        * @throws Exception
        */
       public void startServer(int port) {
    -    bootstrap = new ServerBootstrap();
         dictionaryServerHandler = new DictionaryServerHandler();
    +    boss = new NioEventLoopGroup();
    +    worker = new NioEventLoopGroup();
    +    // Configure the server.
    +    try {
    +      ServerBootstrap bootstrap = new ServerBootstrap();
    +      bootstrap.group(boss, worker);
    +      bootstrap.channel(NioServerSocketChannel.class);
     
    -    ExecutorService boss = Executors.newCachedThreadPool();
    -    ExecutorService worker = Executors.newCachedThreadPool();
    -
    -    bootstrap.setFactory(new NioServerSocketChannelFactory(boss, worker));
    +      bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
    +        @Override public void initChannel(SocketChannel ch) throws Exception {
    +          ChannelPipeline pipeline = ch.pipeline();
    +          pipeline.addLast("DictionaryServerHandler", dictionaryServerHandler);
    +        }
    +      });
    +      bootstrap.bind(port).sync();
    --- End diff --
   
    ok


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102693282
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/server/DictionaryServer.java ---
    @@ -83,9 +81,12 @@ public ChannelPipeline getPipeline() throws Exception {
        */
       public void shutdown() throws Exception {
         DictionaryKey key = new DictionaryKey();
    -    key.setType("WRITE_DICTIONARY");
    +    key.setType(DictionaryKeyType.WRITE_DICTIONARY);
         dictionaryServerHandler.processMessage(key);
    -    bootstrap.releaseExternalResources();
    -    bootstrap.shutdown();
    +    worker.shutdownGracefully();
    --- End diff --
   
    Method `bootstrap.group()` is deprecated, so can we use `EventLoopGroup` to shutdown?


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102693310
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/dictionary/generator/key/DictionaryKey.java ---
    @@ -36,17 +36,76 @@
       /**
        * message data
        */
    -  private Object data;
    +  private String data;
     
       /**
    -   * message type
    +   * Dictionary Value
        */
    -  private String type;
    +  private int dictionaryValue = -1;
    --- End diff --
   
    ok


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/605#discussion_r102693979
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/RowConverterImpl.java ---
    @@ -104,23 +129,12 @@ public DictionaryClient call() throws Exception {
           }
    --- End diff --
   
    ok


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    @chenliang613  already single pass data load test cases exist in `TestLoadDataWithSinglePass` testcase


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/940/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/941/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/942/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    retest this please


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/944/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #605: [CARBONDATA-715] Optimize Single-Pass data ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/605
 
    LGTM


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #605: [CARBONDATA-715] Optimize Single-Pas...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-carbondata/pull/605


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
12