The first issue i ran into is all the demos currently online are done using an IDE. IDE's are great for development, but its good to decouple production code from your dev environment (java devs are notoriously good at avoiding this b/c of their awesome tools :)) . So, too bootstrap my project I luckily was able to find a production teiid server floating around internally at my company, and I connected to is by building a minimal java application, with the following build file:
- https://gist.github.com/jayunit100/e636c7daa69fcfd35d450bd709071203
- A few lessons i learned for real world deploy
- data virtualization authentication
- Normal teeid servers will expect you to be authenticated and connect via https.
- This is done using ssl and certs.
- DNS lookup finds kerberos servers for you. So, you need to run kinit in spark workers.
- to do this, install krb workstation + kinit + make sure you're on the network you need to be on and get a cert if its provided.
- if you're outside a place where you can wget a cert easily: just
- Dependencies
- To create a data virt app, you need to carefully select your dependencies
- "https://repository.jboss.org/nexus/content/repositories/releases/"url "http://repository.jboss.org/nexus/content/groups/public/"url "https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/"url "http://repository.jboss.org/nexus/content/groups/developer/"url "https://maven.repository.redhat.com/techpreview/all/"url "https://maven.repository.redhat.com/earlyaccess/all/"
- OOME errors, be careful
- We all know spark loves memory. but Teiid does to ! so you can get exceptions like this"
"Caused by: org.teiid.net.CommunicationException: TEIID20018 Unable to find a component used authenticate on to Teiid at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:147) at org.teiid.net.socket.SocketServerConnection.<init>(SocketServerConnection.java:95) at org.teiid.net.socket.SocketServerConnectionFactory.getConnection(SocketServerConnectionFactory.java:316) at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:64) ... 21 more Caused by: org.teiid.core.TeiidComponentException: Java heap space at org.teiid.client.util.ExceptionUtil.convertException(ExceptionUtil.java:65) at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler.invoke(SocketServerInstanceImpl.java:424) - BUT that actually is a SERVER side error, not a client side error.
- This error can be fixed via rebooting a the teiid jdbc server side components.
No comments:
Post a Comment