Re: [QUESTION]: httpclient dependency

2020-04-23 Thread Paul Rogers
Hi All,
I think there may be a bit of confusion. It may be true that some of Drill's 
dependencies now use the newer version of the library 
httpcomponents:httpclient. However, it looks like ES directly depends on the 
older flavor.

We have pom file entries which exclude that old version. As a result, ES can't 
find the older version at run time.

So, maybe two choices. 1) convince ES to use the newer version (how?), or 2 
retain the older version (don't exclude it.)

Would sure be nice if each storage plugin could run in its own class loader to 
avoid these issues. We're slowly moving in that direction.

Thanks,
- Paul

 

On Thursday, April 23, 2020, 5:35:55 PM PDT, Charles Givre 
 wrote:  
 
 Hi Vova, 
Thanks for the response.  I've been slowly poking at a storage plugin for 
ElasticSearch.[1]  I was going to do some work on it, but after rebasing to the 
latest master, I'm getting errors in my unit tests that were not there before. 

Here's the relevant snippet of the dependency tree:

[INFO] +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.6.2:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.12:compile
[INFO] |  \- org.apache.httpcomponents:httpcore-nio:jar:4.4.12:compile
[INFO] +- org.elasticsearch:elasticsearch-hadoop:jar:7.6.2:compile

Currently, I don't have the dependency excluded or anything like that in the 
pom.xml for the storage plugin so I would assume that the dependency would be 
included, but it doesn't seem to be. Would you have any suggestions as to how 
to fix it?


Thanks,
-- C



Here's the full stack trace:
19:58:51.940 [Time-limited test] DEBUG o.a.d.e.s.e.TestElasticQueries - select 
* from elasticsearch.employee.`developer`
19:58:52.011 [215dd444-5b82-78b6-6222-25db75b0a934:foreman] DEBUG 
o.a.d.e.s.e.ElasticSearchGroupScan - Getting region locations

org.apache.drill.exec.rpc.RpcException: 
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
ClassNotFoundException: 
org.apache.commons.httpclient.protocol.ProtocolSocketFactory


Please, refer to logs for more information.

[Error Id: f43ab4ec-d557-45df-a41d-1a0221c3ffdb on 192.168.1.25:31013]

    at org.apache.drill.exec.rpc.RpcException.mapException(RpcException.java:59)
    at 
org.apache.drill.exec.client.DrillClient$ListHoldingResultsListener.getResults(DrillClient.java:881)
    at org.apache.drill.exec.client.DrillClient.runQuery(DrillClient.java:583)
    at org.apache.drill.test.QueryBuilder.results(QueryBuilder.java:331)
    at 
org.apache.drill.test.ClusterFixture$FixtureTestServices.testRunAndReturn(ClusterFixture.java:615)
    at 
org.apache.drill.test.DrillTestWrapper.testRunAndReturn(DrillTestWrapper.java:938)
    at 
org.apache.drill.test.DrillTestWrapper.compareUnorderedResults(DrillTestWrapper.java:533)
    at org.apache.drill.test.DrillTestWrapper.run(DrillTestWrapper.java:172)
    at org.apache.drill.test.TestBuilder.go(TestBuilder.java:145)
    at 
org.apache.drill.exec.store.elasticsearch.TestElasticQueries.testSimpleStarQuery(TestElasticQueries.java:83)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.drill.common.exceptions.UserRemoteException: SYSTEM 
ERROR: ClassNotFoundException: 
org.apache.commons.httpclient.protocol.ProtocolSocketFactory


Please, refer to logs for more information.

[Error Id: f43ab4ec-d557-45df-a41d-1a0221c3ffdb on 192.168.1.25:31013]
    at 
org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:125)
    at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:422)
    at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:96)
    at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:273)
    at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:243)
    at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
    at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
    at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
    at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
    at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
    at 

Re: [QUESTION]: httpclient dependency

2020-04-23 Thread Charles Givre
Hi Vova, 
Thanks for the response.  I've been slowly poking at a storage plugin for 
ElasticSearch.[1]  I was going to do some work on it, but after rebasing to the 
latest master, I'm getting errors in my unit tests that were not there before. 

Here's the relevant snippet of the dependency tree:

[INFO] +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.6.2:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.12:compile
[INFO] |  \- org.apache.httpcomponents:httpcore-nio:jar:4.4.12:compile
[INFO] +- org.elasticsearch:elasticsearch-hadoop:jar:7.6.2:compile

Currently, I don't have the dependency excluded or anything like that in the 
pom.xml for the storage plugin so I would assume that the dependency would be 
included, but it doesn't seem to be. Would you have any suggestions as to how 
to fix it?


Thanks,
-- C



Here's the full stack trace:
19:58:51.940 [Time-limited test] DEBUG o.a.d.e.s.e.TestElasticQueries - select 
* from elasticsearch.employee.`developer`
19:58:52.011 [215dd444-5b82-78b6-6222-25db75b0a934:foreman] DEBUG 
o.a.d.e.s.e.ElasticSearchGroupScan - Getting region locations

org.apache.drill.exec.rpc.RpcException: 
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
ClassNotFoundException: 
org.apache.commons.httpclient.protocol.ProtocolSocketFactory


Please, refer to logs for more information.

[Error Id: f43ab4ec-d557-45df-a41d-1a0221c3ffdb on 192.168.1.25:31013]

at 
org.apache.drill.exec.rpc.RpcException.mapException(RpcException.java:59)
at 
org.apache.drill.exec.client.DrillClient$ListHoldingResultsListener.getResults(DrillClient.java:881)
at 
org.apache.drill.exec.client.DrillClient.runQuery(DrillClient.java:583)
at org.apache.drill.test.QueryBuilder.results(QueryBuilder.java:331)
at 
org.apache.drill.test.ClusterFixture$FixtureTestServices.testRunAndReturn(ClusterFixture.java:615)
at 
org.apache.drill.test.DrillTestWrapper.testRunAndReturn(DrillTestWrapper.java:938)
at 
org.apache.drill.test.DrillTestWrapper.compareUnorderedResults(DrillTestWrapper.java:533)
at org.apache.drill.test.DrillTestWrapper.run(DrillTestWrapper.java:172)
at org.apache.drill.test.TestBuilder.go(TestBuilder.java:145)
at 
org.apache.drill.exec.store.elasticsearch.TestElasticQueries.testSimpleStarQuery(TestElasticQueries.java:83)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.drill.common.exceptions.UserRemoteException: SYSTEM 
ERROR: ClassNotFoundException: 
org.apache.commons.httpclient.protocol.ProtocolSocketFactory


Please, refer to logs for more information.

[Error Id: f43ab4ec-d557-45df-a41d-1a0221c3ffdb on 192.168.1.25:31013]
at 
org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:125)
at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:422)
at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:96)
at 
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:273)
at 
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:243)
at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312)
at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:286)
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at 

[GitHub] [drill] cgivre opened a new pull request #2067: DRILL-7716: Create Format Plugin for SPSS Files

2020-04-23 Thread GitBox


cgivre opened a new pull request #2067:
URL: https://github.com/apache/drill/pull/2067


   # [DRILL-7716](https://issues.apache.org/jira/browse/DRILL-7716): Create 
Format Plugin for SPSS Files
   
   ## Description
   
   This PR adds the ability for Drill to query SPSS files.
   
   ## Documentation
   # Format Plugin for SPSS (SAV) Files
   This format plugin enables Apache Drill to read and query Statistical 
Package for the Social Sciences (SPSS) (or Statistical Product and Service 
Solutions) data files. According
to Wikipedia: [1]

SPSS is a widely used program for statistical analysis in social science. 
It is also used by market researchers, health researchers, survey companies, 
government, education researchers, marketing organizations, data miners, and 
others. The original SPSS manual (Nie, Bent & Hull, 1970) has been described as 
one of "sociology's most influential books" for allowing ordinary researchers 
to do their own statistical analysis. In addition to statistical analysis, data 
management (case selection, file reshaping, creating derived data) and data 
documentation (a metadata dictionary is stored in the datafile) are features of 
the base software.


   ## Configuration 
   To configure Drill to read SPSS files, simply add the following code to the 
formats section of your file-based storage plugin.  This should happen 
automatically for the default
`cp`, `dfs`, and `S3` storage plugins.

Other than the file extensions, there are no variables to configure.

   ```json
   "spss": {
 "type": "spss",
 "extensions": [
   "sav"
 ]
   }
   ```
   
   ## Data Model
   SPSS only supports two data types: Numeric and Strings.  Drill maps these to 
`DOUBLE` and `VARCHAR` respectively. However, for some numeric columns, SPSS 
maps these numbers to
text, similar to an `enum` field in Java.

For instance, a field called `Survey` might have labels as shown below:


   
   Value
   Text
   
   
   1
   Yes
   
   
   2
   No
   
   
   99
   No Answer
   

   
   For situations like this, Drill will create two columns. In the example 
above you would get a column called `Survey` which has the numeric value (1,2 
or 99) as well as a column
called `Survey_value` which will map the integer to the appropriate value. 
Thus, the results would look something like this:



`Survey`
`Survey_value`


1
Yes

 
 1
 Yes
 
  
  1
  Yes
  
   
   2
   No
   

1
Yes

 
 2
 No
 
 
 99
 No Answer
 

   
   
   [1]: https://en.wikipedia.org/wiki/SPSS
   ## Testing
   There are unit tests attached to this PR. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Created] (DRILL-7716) Create Format Plugin for SPSS Files

2020-04-23 Thread Charles Givre (Jira)
Charles Givre created DRILL-7716:


 Summary: Create Format Plugin for SPSS Files
 Key: DRILL-7716
 URL: https://issues.apache.org/jira/browse/DRILL-7716
 Project: Apache Drill
  Issue Type: Improvement
  Components: Storage - Text  CSV
Affects Versions: 1.17.0
Reporter: Charles Givre
Assignee: Charles Givre
 Fix For: 1.18.0


# Format Plugin for SPSS (SAV) Files
This format plugin enables Apache Drill to read and query Statistical Package 
for the Social Sciences (SPSS) (or Statistical Product and Service Solutions) 
data files. According
 to Wikipedia: [1]
 
 SPSS is a widely used program for statistical analysis in social science. It 
is also used by market researchers, health researchers, survey companies, 
government, education researchers, marketing organizations, data miners, and 
others. The original SPSS manual (Nie, Bent & Hull, 1970) has been described as 
one of "sociology's most influential books" for allowing ordinary researchers 
to do their own statistical analysis. In addition to statistical analysis, data 
management (case selection, file reshaping, creating derived data) and data 
documentation (a metadata dictionary is stored in the datafile) are features of 
the base software.
 
 
## Configuration 
To configure Drill to read SPSS files, simply add the following code to the 
formats section of your file-based storage plugin.  This should happen 
automatically for the default
 `cp`, `dfs`, and `S3` storage plugins.
 
 Other than the file extensions, there are no variables to configure.
 
```json
"spss": {
  "type": "spss",
  "extensions": [
"sav"
  ]
}
```

## Data Model
SPSS only supports two data types: Numeric and Strings.  Drill maps these to 
`DOUBLE` and `VARCHAR` respectively. However, for some numeric columns, SPSS 
maps these numbers to
 text, similar to an `enum` field in Java.
 
 For instance, a field called `Survey` might have labels as shown below:
 
 

Value
Text


1
Yes


2
No


99
No Answer

 

For situations like this, Drill will create two columns. In the example above 
you would get a column called `Survey` which has the numeric value (1,2 or 99) 
as well as a column
 called `Survey_value` which will map the integer to the appropriate value. 
Thus, the results would look something like this:
 
 
 
 `Survey`
 `Survey_value`
 
 
 1
 Yes
 
  
  1
  Yes
  
   
   1
   Yes
   

2
No

 
 1
 Yes
 
  
  2
  No
  
  
  99
  No Answer
  
 


[1]: https://en.wikipedia.org/wiki/SPSS




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [drill] agozhiy opened a new pull request #2066: DRILL-7705: Updated jQuery and Bootstrap libraries

2020-04-23 Thread GitBox


agozhiy opened a new pull request #2066:
URL: https://github.com/apache/drill/pull/2066


   # [DRILL-7705](https://issues.apache.org/jira/browse/DRILL-7705): Updated 
jQuery and Bootstrap libraries
   
   ## Description
   
   - jQuery: 3.2.1 -> 3.4.1
   - Bootstrap: 3.1.1 -> 4.4.1
   - Also fixed styles that were considerably broken after the update.
   
   Note: the latest version of jQuery is 3.5.0 but I had to revert it to 3.4.1 
due to broken collapse mechanism (it is widely used on profile page). See 
https://github.com/twbs/bootstrap/issues/30553 for details.
   
   ## Documentation
   No new functionality.
   
   ## Testing
   Manually verified the Web UI, ran usual set of unit/functional tests.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org