Resending this since the original response went only to Teemu. Developers may 
want to look into the potential bug discussed below.
- Paul
 Hi Teemu,
Thanks for posting the detailed information. Very helpful.
You are running Sqlline with an embedded Drillbit (that's what drill-embedded) 
does. I suspect that you are hitting an issue due to the way that Drill builds 
the JDBC driver. I'll explain the issue (for the benefit of the Drill folks) 
then suggest a solution for you.
Drill builds a JDBC driver that includes all of Drill. But, Drill is huge (200+ 
MB), we try to create a dependency-reduced jar. It seems that we are not 
removing so much from the jar that it can no longer run an embedded server. The 
problem in this case is that the jar relocates the package with DrillConfig, 
but it looks like some other part of the code is not adjusted. From the 
dependency-reduced-pom.xml file:

          <relocations>

            ...

            <relocation>

              <pattern>org.apache.drill.common.</pattern>

              <shadedPattern>oadd.org.apache.drill.common.</shadedPattern>

            </relocation>

The stack trace you provided shows that the code tries to reference DrillConfig 
in its original location: org.apache.drill.common.config.DrillConfig. But, 
because of the relocation, it should be referenced as 
add.org.apache.drill.common.config.DrillConfig.
This is clearly a bug. Would be great if someone (Kunal?) could verify this and 
file a bug.
In the mean time, I'd suggest you simply run an actual Drill server, then 
connect Sqlline to that server. You'll want to run as a server anyway to use 
the Web UI, to see query profiles, to change your storage profiles, and so on.
A quick check of the documentation suggests we don't actually write up this use 
case. (Suggestion to Bridget: we should.) Here is what to do:
1. Ensure you have a Zookeeper running on your machine. See [1] for hints. You 
only need one ZK on your laptop.2. Start Drill with drillbit.sh start. (See the 
distributed mode docs for the other commands.)3. Start Sqlline as explained in 
[2]
The "out of the box" Drill config uses the "out of the box" ZK config, so you 
should not have to do any setup. Seen the docs for how to use the web console 
and how to stop your Drill server.
Another key advantage of this mode is that you can better control memory, which 
is important as you run larger or more complex queries.
Thanks,
- Paul
[1] http://drill.apache.org/docs/distributed-mode-prerequisites/[2] 
http://drill.apache.org/docs/starting-drill-in-distributed-mode/

 

    On Friday, January 26, 2018, 12:32:13 AM PST, [email protected] 
<[email protected]> wrote:  
 
 Hi all,

I'm trying to follow the 10 minutes tutorial and I get stuck right 
away...

https://drill.apache.org/docs/drill-in-10-minutes/

Everything works just fine with my ubuntu box, but with osx, this is all 
I get

$ bin/drill-embedded
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; 
support was removed in 8.0
sun/misc/VM
apache drill 1.12.0
"just drill it"
0: jdbc:drill:zk=local> SELECT * FROM cp.`employee.json` LIMIT 3;
No current connection
0: jdbc:drill:zk=local> !list
1 active connection:
  #0  closed  jdbc:drill:zk=local
0: jdbc:drill:zk=local> !quit
java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.drill.common.config.DrillConfig
    at 
org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:124)
    at 
org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
    at 
org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
    at 
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:144)
    at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
    at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
    at 
sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
    at sqlline.Commands.close(Commands.java:925)
    at sqlline.Commands.quit(Commands.java:889)
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at 
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
    at sqlline.SqlLine.dispatch(SqlLine.java:742)
    at sqlline.SqlLine.begin(SqlLine.java:621)
    at sqlline.SqlLine.start(SqlLine.java:375)
    at sqlline.SqlLine.main(SqlLine.java:268)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not 
initialize class org.apache.drill.common.config.DrillConfig
    at 
org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:124)
    at 
org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
    at 
org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
    at 
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:144)
    at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
    at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
    at 
sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
    at sqlline.Commands.close(Commands.java:925)
    at sqlline.Commands.closeall(Commands.java:899)
    at sqlline.SqlLine.begin(SqlLine.java:649)
    at sqlline.SqlLine.start(SqlLine.java:375)
    at sqlline.SqlLine.main(SqlLine.java:268)

What's going on here? Am I missing something obvious? All help is 
appreciated!


Teemu
    

Reply via email to