How to get Java to access Cassandra 1.0.10 - java

Can anyone recommend a good way to create scripts in java that will work with an older Cassandra 1.0.10 database? I'm having trouble finding stuff online. Is thrift a type of driver?
Thanks!

Apache Thrift is way to connect to the Cassandra RPC server 1).
In the Cassandra source three there is a file /interface/cassandra.thrift which is an interface description file (IDL) that can be fed to the Apache Thrift compiler in order to generate Java code. By means of this Java code you will be able to access Cassandra. The whole process is described in more detail in the Cassandra wiki.
However, it is recommended to use a more high-level client library instead, because the raw Cassandra API is quite complex. You'll find the existing libraries, such as Hector, much more handy for your task.
1) Some more details about Thrift can be found in this answer.

Related

How to run Azure Data Factory pipeline on Java Eclipse

I am doing a project to integrate ADF pipeline with Java project. Is there any possible way to run the ADF pipeline remotely using Java?
I am a newcomer to this field and I didn't find any valuable articles regarding the question. Pls let me know if there is any possible solution to do so.
You may use the REST API to trigger pipeline runs from external applications, including Java. It is a POST request, and you may find details here:
https://learn.microsoft.com/en-us/rest/api/datafactory/pipelines/create-run?tabs=HTTP
Alternatively, there is a Data Factory client library for Java. It appears to be in beta, but provides the functionality you are looking for:
https://learn.microsoft.com/en-us/java/api/overview/azure/resourcemanager-datafactory-readme?view=azure-java-preview

Kafka Connect internal architecture

I am trying to understand the internal nuances of Kafka connect, like how the design has been implemented and which patterns are used.
specifically I want to understand how to develop similar app which can take input configuration and start acting according to the configuration, so when we have to implement some new feature we can just write connects. So others need not to spend more time in reinventing the wheel.
Apache Kafka is open source, and you can find the Connect source code here.
But if you just want to create a source connector, the internals will not really help you do that.
Confluent has a blog post on developing custom source connectors.
Alternatively, you could not "reinvent the wheel" yourself, and use projects like Apache Camel to see if they support a source system you're using.

How to connect to a JanusGraph with dynamodb backend using Java Client Code?

I am trying to build a Java application which uses JanusGraph(with dynamodb backend) which is hosted on a remote machine and has gremlin server started.
I want to know what my options are when writing a client for this setup!!
1) Any OGM like FERMA. Looks like there is no support.
2) Use gremlin java driver and write the client code using Cluster Class.
3) Anything else ?
I am the lead developer on Ferma.
Obviously I am a bit bias but ferma has fairly complete documentation (I hope), and we always respond on gitter and to issues within 24 hours. So support shouldnt be much of a problem.
I havent seen any complete OGM options outside of Ferma but there are a few obsolete projects like totorom, frames, peapod, and similar you may want to look at. I am afraid they will have even less support than ferma though.
To your question, to connect to JanusGraph there are several options depending on the framework you using. You basically configure any options you need in the JanusGraphFactory then connect to the desired host with the following call. Then just pass this graph object into the constructor of a FramedGraph.
Graph graph = JanusGraphFactory.open('cassandra:localhost')

Choosing Apache Cassandra client

There is a bunch of different cassandra's clients in now days. Most of them was built on top of Thrift driver and then adopted to use DataStax Java driver. I can name Kundera and Astynax as biggest of them. The last one has only a beta support for the Java driver. And there is an Achilles client that build on top of DataStax Java driver and supports all new Cassandra features. It's a little bit younger and I know nothing of it's use cases in production. But it looks very promising.
So I'm new in NoSQL world ask you to give me a hint - with client to use with new project? Suppose it will be a big solution with 33 nodes Cassandra cluster and a lot of different kinds of queries to db.
Thank you in advance.
If the platform you're on has a client from DataStax, use that. The DataStax drivers for the jvm and .NET (and possibly others) are quite polished, support all available features, and deal with connection complexity internally very nicely. In addition, if you're looking to do Spark analytics, the DataStax Spark connector is the only option supporting good locality, and it uses the DataStax java driver internally.

Neo4j 2.0 with Eclipse Java

I want to interact with remote Neo4j server 2.0 version from Eclipse Java program. Can some one tell me,what tools and libraries do I need to achieve this.
Please note that it need to interact with remote DB server and not the embedded Noe4j. Please advise.
Check out the Neo4j JDBC driver. That should work best for your purposes:
https://github.com/neo4j-contrib/neo4j-jdbc/tree/2.0
If you've worked with a JDBC driver before it should be as easy. Just make sure to use parametrized PreparedStatement for your queries.
There are a few other options as well:
The native Neo4j REST API. Docs are here: http://docs.neo4j.org/chunked/stable/rest-api.html and an example is here: https://github.com/jimwebber/neo4j-tutorial/blob/master/src/koan/java/org/neo4j/tutorial/advanced/BasicRestApiFormerlyKoan10.java (check out the entire Koan project; it's a fantastic way to get really familiar with Neo4j's Java libs). The example makes use of a Jersey client to call out to the Neo4j server.
https://github.com/neo4j/java-rest-binding - The URL should speak for itself. There are tags for Neo4j 2.0 as well. This binding essentially wraps the above in a nice, neat package. Beats having to write your own wrapper.
Spring Data for Neo4j (http://projects.spring.io/spring-data-neo4j/). If you're using Spring in your Java development, this is definitely worth a look. The update for Neo4j 2.0 just came out a few weeks ago and should be ready for production very soon. There are pros and cons to using SDN, but, it's super easy to use, especially if you don't need anything overly complicated.
Hope this helps!

Categories

Resources