You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Xiao Meng <xi...@gmail.com> on 2015/02/11 09:10:51 UTC

Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/
-----------------------------------------------------------

Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.


Bugs: DRILL-1197
    https://issues.apache.org/jira/browse/DRILL-1197


Repository: drill-git


Description
-------

It also

    - returns more detailed connection status for validate handshake.
    - adds timeout options for query submitter.


Diffs
-----

  contrib/native/client/example/querySubmitter.cpp 2d89223 
  contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
  contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
  contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
  contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
  contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
  contrib/native/client/src/include/drill/common.hpp f83aae4 
  contrib/native/client/src/include/drill/drillClient.hpp 0204855 

Diff: https://reviews.apache.org/r/30868/diff/


Testing
-------

Tried with a long running query for query timeout.
https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql


```bash
./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
```


Thanks,

Xiao Meng


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Xiao Meng <xi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/
-----------------------------------------------------------

(Updated Feb. 13, 2015, 2:06 a.m.)


Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.


Changes
-------

squash with Alex's fix + indent fix.


Bugs: DRILL-1197
    https://issues.apache.org/jira/browse/DRILL-1197


Repository: drill-git


Description
-------

It also

    - returns more detailed connection status for validate handshake.
    - adds timeout options for query submitter.


Diffs (updated)
-----

  contrib/native/client/example/querySubmitter.cpp 2d89223 
  contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
  contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
  contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
  contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
  contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
  contrib/native/client/src/include/drill/common.hpp f83aae4 
  contrib/native/client/src/include/drill/drillClient.hpp 0204855 

Diff: https://reviews.apache.org/r/30868/diff/


Testing
-------

Tried with a long running query for query timeout.
https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql


```bash
./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
```


Thanks,

Xiao Meng


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClientImpl.cpp, line 230
> > <https://reviews.apache.org/r/30868/diff/1/?file=860716#file860716line230>
> >
> >     I  prefer the original log message.

Reverted.


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClientImpl.cpp, line 313
> > <https://reviews.apache.org/r/30868/diff/1/?file=860716#file860716line313>
> >
> >     Why don't we need to reset the io_service if this function returns with an error?

Could you please eloborate more. Do you mean we should performe an error checking to see if there is any errors? What I coudl see from the context is that we need to reset the io_service before using it for queries. 

as per documentation:

io_service::reset

Reset the io_service in preparation for a subsequent run() invocation.

void reset();
This function must be called prior to any second or later set of invocations of the run(), run_one(), poll() or poll_one() functions when a previous invocation of these functions returned due to the io_service being stopped or running out of work. After a call to reset(), the io_service object's stopped() function will return false.

This function must not be called while there are any unfinished calls to the run(), run_one(), poll() or poll_one() functions.


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Parth Chandra <pc...@maprtech.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClientImpl.cpp, line 313
> > <https://reviews.apache.org/r/30868/diff/1/?file=860716#file860716line313>
> >
> >     Why don't we need to reset the io_service if this function returns with an error?
> 
> Alexander zarei wrote:
>     Could you please eloborate more. Do you mean we should performe an error checking to see if there is any errors? What I coudl see from the context is that we need to reset the io_service before using it for queries. 
>     
>     as per documentation:
>     
>     io_service::reset
>     
>     Reset the io_service in preparation for a subsequent run() invocation.
>     
>     void reset();
>     This function must be called prior to any second or later set of invocations of the run(), run_one(), poll() or poll_one() functions when a previous invocation of these functions returned due to the io_service being stopped or running out of work. After a call to reset(), the io_service object's stopped() function will return false.
>     
>     This function must not be called while there are any unfinished calls to the run(), run_one(), poll() or poll_one() functions.

You're right. I misunderstood the context in which the code was being called.


- Parth


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/example/querySubmitter.cpp, line 23
> > <https://reviews.apache.org/r/30868/diff/1/?file=860713#file860713line23>
> >
> >     Is it possible to not use Boost here? We are trying to minimize dependence on Boost

changed to atoi from stdlib.h + tested


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/example/querySubmitter.cpp, line 23
> > <https://reviews.apache.org/r/30868/diff/1/?file=860713#file860713line23>
> >
> >     Is it possible to not use Boost here? We are trying to minimize dependence on Boost
> 
> Alexander zarei wrote:
>     changed to atoi from stdlib.h + tested

http://www.boost.org/doc/libs/1_57_0/doc/html/boost_lexical_cast.html


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClient.cpp, line 88
> > <https://reviews.apache.org/r/30868/diff/1/?file=860714#file860714line88>
> >
> >     The previous code assumed that the timeout value can never be zero. This assumption should be explicitly enforced here in the setters. If the value provided is <=0 then we should ignore the value and use the default.
> >     The updated code in this patch does not start the timer at all if the value is <=0 which is not desirable.

applied

if (t > 0)
	{
		boost::lock_guard<boost::mutex> configLock(DrillClientConfig::s_mutex);
		s_handshakeTimeout = t;
	}


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClientImpl.cpp, line 206
> > <https://reviews.apache.org/r/30868/diff/1/?file=860716#file860716line206>
> >
> >     I think you need to cancel the timer before you do anything. What if the timer expires while you're processing the handshake?

applied


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClientImpl.cpp, line 264
> > <https://reviews.apache.org/r/30868/diff/1/?file=860716#file860716line264>
> >
> >     Can we have just one log message here?

combined two log statements into one as:

DRILL_LOG(LOG_TRACE) << "DrillClientImpl::HandleHShakeReadTimeout: Deadline timer expired; ERR_CONN_HSHAKETIMOUT.\n";


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Alexander zarei <al...@gmail.com>.

> On Feb. 11, 2015, 7:22 p.m., Parth Chandra wrote:
> > contrib/native/client/src/clientlib/drillClientImpl.cpp, line 727
> > <https://reviews.apache.org/r/30868/diff/1/?file=860716#file860716line727>
> >
> >     Can we merge these log messages. In general, I prefer the original log message.

merged as

			DRILL_LOG(LOG_TRACE) << "DrillClientImpl::handleReadTimeout: Deadline timer expired; ERR_QRY_TIMOUT. \n";


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>


Re: Review Request 30868: DRILL-1197: C++ Client. Differentiate socket/handshake/query timeout for deadline timer.

Posted by Parth Chandra <pc...@maprtech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30868/#review71988
-----------------------------------------------------------



contrib/native/client/example/querySubmitter.cpp
<https://reviews.apache.org/r/30868/#comment117906>

    Is it possible to not use Boost here? We are trying to minimize dependence on Boost



contrib/native/client/src/clientlib/drillClient.cpp
<https://reviews.apache.org/r/30868/#comment117927>

    The previous code assumed that the timeout value can never be zero. This assumption should be explicitly enforced here in the setters. If the value provided is <=0 then we should ignore the value and use the default.
    The updated code in this patch does not start the timer at all if the value is <=0 which is not desirable.



contrib/native/client/src/clientlib/drillClientImpl.cpp
<https://reviews.apache.org/r/30868/#comment117909>

    I think you need to cancel the timer before you do anything. What if the timer expires while you're processing the handshake?



contrib/native/client/src/clientlib/drillClientImpl.cpp
<https://reviews.apache.org/r/30868/#comment117910>

    I  prefer the original log message.



contrib/native/client/src/clientlib/drillClientImpl.cpp
<https://reviews.apache.org/r/30868/#comment117921>

    Can we have just one log message here?



contrib/native/client/src/clientlib/drillClientImpl.cpp
<https://reviews.apache.org/r/30868/#comment117922>

    Why don't we need to reset the io_service if this function returns with an error?



contrib/native/client/src/clientlib/drillClientImpl.cpp
<https://reviews.apache.org/r/30868/#comment117924>

    Can we merge these log messages. In general, I prefer the original log message.


- Parth Chandra


On Feb. 11, 2015, 8:10 a.m., Xiao Meng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30868/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2015, 8:10 a.m.)
> 
> 
> Review request for drill, Alexander zarei, Norris Lee, and Parth Chandra.
> 
> 
> Bugs: DRILL-1197
>     https://issues.apache.org/jira/browse/DRILL-1197
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> It also
> 
>     - returns more detailed connection status for validate handshake.
>     - adds timeout options for query submitter.
> 
> 
> Diffs
> -----
> 
>   contrib/native/client/example/querySubmitter.cpp 2d89223 
>   contrib/native/client/src/clientlib/drillClient.cpp 02bc1a4 
>   contrib/native/client/src/clientlib/drillClientImpl.hpp a5eeb77 
>   contrib/native/client/src/clientlib/drillClientImpl.cpp c832a79 
>   contrib/native/client/src/clientlib/errmsgs.hpp 9a69f21 
>   contrib/native/client/src/clientlib/errmsgs.cpp a5e7217 
>   contrib/native/client/src/include/drill/common.hpp f83aae4 
>   contrib/native/client/src/include/drill/drillClient.hpp 0204855 
> 
> Diff: https://reviews.apache.org/r/30868/diff/
> 
> 
> Testing
> -------
> 
> Tried with a long running query for query timeout.
> https://github.com/apache/drill/blob/master/exec/java-exec/src/test/resources/queries/tpch/18.sql
> 
> 
> ```bash
> ./querySubmitter connectStr='zk=127.0.0.1:2181/drill/drillbits1' type=sql api=async query='select c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice, sum(l.l_quantity) from cp.`tpch/customer.parquet` c, cp.`tpch/orders.parquet` o, cp.`tpch/lineitem.parquet` l where o.o_orderkey in ( select l_orderkey from cp.`tpch/lineitem.parquet` group by l_orderkey having sum(l_quantity) > 300) and c.c_custkey = o.o_custkey and o.o_orderkey = l.l_orderkey group by c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice order by o.o_totalprice desc, o.o_orderdate limit 100' queryTimeout=1
> ```
> 
> 
> Thanks,
> 
> Xiao Meng
> 
>