drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david_hudavy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4170) how many concurrent users can be supported
Date Wed, 09 Dec 2015 07:51:10 GMT

    [ https://issues.apache.org/jira/browse/DRILL-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048228#comment-15048228
] 

david_hudavy commented on DRILL-4170:
-------------------------------------

when execute java thread scripts,throw this:

java.sql.SQLException: SYSTEM ERROR: ChannelClosedException: Channel closed /127.0.0.1:31010
<--> /127.0.0.1:38371.

Fragment 0:0

[Error Id: 9e0af36a-7ac3-4887-951f-fc4c24edc4a7 on SC-2:31010]
	at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:247)
	at org.apache.drill.jdbc.impl.DrillCursor.next(DrillCursor.java:320)
	at oadd.net.hydromatic.avatica.AvaticaResultSet.next(AvaticaResultSet.java:187)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.next(DrillResultSetImpl.java:160)
	at MultiThreadTestDrill$WorkerThread.connectToDrill(MultiThreadTestDrill.java:85)
	at MultiThreadTestDrill$WorkerThread.run(MultiThreadTestDrill.java:43)
Caused by: oadd.org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: ChannelClosedException:
Channel closed /127.0.0.1:31010 <--> /127.0.0.1:38371.

Fragment 0:0

[Error Id: 9e0af36a-7ac3-4887-951f-fc4c24edc4a7 on SC-2:31010]
	at oadd.org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:118)
	at oadd.org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:112)
	at oadd.org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:47)
	at oadd.org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:32)
	at oadd.org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:69)
	at oadd.org.apache.drill.exec.rpc.RpcBus$RequestEvent.run(RpcBus.java:400)
	at oadd.org.apache.drill.common.SerializedExecutor$RunnableProcessor.run(SerializedExecutor.java:105)
	at oadd.org.apache.drill.exec.rpc.RpcBus$SameExecutor.execute(RpcBus.java:264)
	at oadd.org.apache.drill.common.SerializedExecutor.execute(SerializedExecutor.java:142)
	at oadd.org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:298)
	at oadd.org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:269)
	at oadd.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
	at oadd.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
	at oadd.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
	at oadd.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
	at oadd.io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
	at oadd.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
	at oadd.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
	at oadd.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
	at oadd.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
	at oadd.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
	at oadd.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
	at oadd.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
	at oadd.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
	at java.lang.Thread.run(Unknown Source)


> how many concurrent users can be supported
> ------------------------------------------
>
>                 Key: DRILL-4170
>                 URL: https://issues.apache.org/jira/browse/DRILL-4170
>             Project: Apache Drill
>          Issue Type: Test
>          Components: Client - JDBC
>    Affects Versions: 1.3.0
>         Environment: drill1.3 JDBC SCRIPTS
>            Reporter: david_hudavy
>             Fix For: 1.5.0
>
>
> import java.sql.Connection;
> import java.sql.Statement;
> import java.sql.DriverManager;
> import java.sql.ResultSet;
> import java.sql.SQLException;
> import java.util.ArrayList;
> import java.util.List;
> public class MultiThreadTestDrill {
>  
>     public static void main(String[] args) throws InterruptedException {
>         int threadNum = 200;
>         long tStart = System.currentTimeMillis();
>         
>         System.out.println(Thread.currentThread().getName() + "START");
>         for (int ii = 0; ii < threadNum; ii++) {
>             Thread t = new WorkerThread();
>             t.start();
>         }
>         while (true) {
>             if (!WorkerThread.hasThreadRunning()) {
>                 break;
>             }
>             Thread.sleep(500);
>         }
>         
>         System.out.println(Thread.currentThread().getName() + "END");
>         long tEnd = System.currentTimeMillis();
>         System.out.println("TOTAL TIME:" + (tEnd - tStart)/1000 + "seconds");
>     }
>  
>     public static class WorkerThread extends Thread {
>         private static List<Thread> runningThreads = new ArrayList<Thread>();
>  
>         public WorkerThread() {
>         }
>  
>         @Override
>         public void run() {
>             regist(this);
>             // PRINT START INFORMATION
>             System.out.println(Thread.currentThread().getName() + "START...");
>             connectToDrill();
>             unRegist(this);
>             // PRINT END INFORMATION
>             System.out.println(Thread.currentThread().getName() + "END");
>         }
>  
>         public void regist(Thread t) {
>             synchronized (runningThreads) {
>                 runningThreads.add(t);
>             }
>         }
>  
>         public void unRegist(Thread t) {
>             synchronized (runningThreads) {
>                 runningThreads.remove(t);
>             }
>         }
>  
>         public static boolean hasThreadRunning() {
>             return (runningThreads.size() > 0);
>         }
>          
>         private void connectToDrill() {
>             // TODO Auto-generated method stub
>             
>             String driver = "org.apache.drill.jdbc.Driver";
>             
>             String url = "jdbc:drill:drillbit=localhost";            
>             String sql = "SELECT count(*) FROM mysql.datamart.StaticInf";
>             try {
>                 
>                 Class.forName(driver);
>                 // connect drill
>                 Connection conn = (Connection) DriverManager.getConnection(url);
>                 if (!conn.isClosed())
>                     System.out.println("Succeeded connecting to the Drill!");
>                 
>                 Statement statement = (Statement) conn.createStatement();
>                  
>                 ResultSet rs = statement.executeQuery(sql);
>                 
>                 while (rs.next()) {
>                     System.out.println(rs.getString(1));
>                 }
>                 rs.close();
>                 conn.close();
>             } catch (ClassNotFoundException e) {
>                 System.out.println("Sorry,can`t find the Driver!");
>                 e.printStackTrace();
>             } catch (SQLException e) {
>                 e.printStackTrace();
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>     }
> }
> mysql.datamart.StaticInf has 2144781 rows



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message