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

Joel Bernstein commented on SOLR-8508:
--------------------------------------

I think the best approach is to sublcass StatementImpl and create a statement 
that sends these types of database meta data requests to the SQLHandler. The 
SQLHandler can respond with custom Streams that fulfill the request.

I think for the catalog request we can simply return one Tuple with the zkHost 
address. Eventually there will be a mechanism for mapping zkHosts to names so 
that we can query across zkHosts like this:

select a from table@zkJapan

The schema's will map directly to SolrCloud collections.

As we dig deeper into this we start to overlap with work that needs to be done 
for the Calcite optimizer implementation (SOLR-8593).




  

> Implement DatabaseMetaDataImpl.getCatalogs()
> --------------------------------------------
>
>                 Key: SOLR-8508
>                 URL: https://issues.apache.org/jira/browse/SOLR-8508
>             Project: Solr
>          Issue Type: Sub-task
>          Components: SolrJ
>    Affects Versions: Trunk
>            Reporter: Kevin Risden
>
> DBVisualizer users DatabaseMetaDataImpl.getCatalogs() to populate information 
> after connecting. It causes the below error and shows up in the connection 
> window.
> 2016-01-07 13:30:10.848 FINE    83 [ExecutorRunner-pool-2-thread-10 - 
> B.execute] Execute Command: getCatalogs
> 2016-01-07 13:30:10.848 FINE    83 [ExecutorRunner-pool-2-thread-10 - O.ᅣリ] 
> getCatalogs() for: abc
> 2016-01-07 13:30:10.848 FINE    83 [pool-3-thread-10 - E.ᅣチ] RootConnection: 
> DatabaseMetaDataImpl.getCatalogs()
> 2016-01-07 13:30:10.851 FINE    83 [AWT-EventQueue-0 - B.executionFinished] 
> Exception while Connecting
> com.onseven.dbvis.K.B.P: java.util.concurrent.ExecutionException: 
> java.lang.IllegalArgumentException: model passed to DefaultTableModelWrapper 
> cannot be null
>       at com.onseven.dbvis.K.B.L.ᅣチ(Z:2680)
>       at com.onseven.dbvis.K.B.L.ᅣチ(Z:1521)
>       at com.onseven.dbvis.K.B.L$3.run(Z:3032)
>       at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
>       at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
>       at java.awt.EventQueue.access$500(EventQueue.java:97)
>       at java.awt.EventQueue$3.run(EventQueue.java:709)
>       at java.awt.EventQueue$3.run(EventQueue.java:703)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
>       at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
>       at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
>       at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
>       at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
>       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
>       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>       at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.IllegalArgumentException: model passed to DefaultTableModelWrapper 
> cannot be null
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>       at javax.swing.SwingWorker.get(SwingWorker.java:602)
>       at com.onseven.dbvis.K.B.L.ᅣチ(Z:990)
>       ... 16 more
> Caused by: java.lang.IllegalArgumentException: model passed to 
> DefaultTableModelWrapper cannot be null
>       at com.jidesoft.grid.TableModelWrapperImpl.<init>(Unknown Source)
>       at com.jidesoft.grid.DefaultTableModelWrapper.<init>(Unknown Source)
>       at com.jidesoft.grid.FilterableTableModel.<init>(Unknown Source)
>       at com.jidesoft.grid.FilterableTreeTableModel.<init>(Unknown Source)
>       at com.onseven.dbvis.K.B._.<init>(Z:1161)
>       at com.onseven.dbvis.db.AbstractFacade.executeAndGet(Z:975)
>       at com.onseven.dbvis.db.AbstractFacade.getCatalogNames(Z:621)
>       at com.onseven.dbvis.db.AbstractFacade.runConnectionSetup(Z:2515)
>       at com.onseven.dbvis.db.A.I.ᅣᄋ(Z:3512)
>       at com.onseven.dbvis.db.A.B.execute(Z:2933)
>       at com.onseven.dbvis.K.B.Z.ᅣチ(Z:2285)
>       at com.onseven.dbvis.K.B.L.ᅣツ(Z:1374)
>       at com.onseven.dbvis.K.B.L.doInBackground(Z:1521)
>       at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at javax.swing.SwingWorker.run(SwingWorker.java:334)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to