Mapr Hbase file jar - mapr

hello I'm new in learner in mapr , can someone give me a list of jars or a pom.xml example file , for developing hbase apps, by the way i'm using sandbox version 5.0.0 for testing and thanks everybody

Add the following to your Maven project file:
Repository
<repository>
<id>mapr-maven</id>
<url>http://repository.mapr.com/maven/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
Dependencies
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>0.98.9-mapr-1503-m7-4.1.0</version>
</dependency>
Also do you know if you are using HBase or MapR-DB tables in your application?
You can find a complete MapR-DB sample application here : https://github.com/tgrall/mapr-nosql-samples

Related

add custome dependency to spark

I want to add <JsonTemplateLayout eventTemplateUri="classpath:LogstashJsonEventLayoutV1.json" charset="UTF-8"/> to log4j2.xml for spark configuration.
but I don't have JsonTemplateLayout dependency. how can I add this dependency to spark?
You need to make sure that both log4j-core and log4j-json modules are included in your project. To use log4j with Apache Spark, you need to add the following dependencies to your project:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-json</artifactId>
<version>2.12.1</version>
</dependency>
Note that the version numbers above are the latest version of log4j, you may need to adjust the version numbers appropriately depending on the version of log4j you are using.

Cucumber Exception in thread "main" java.lang.NoClassDefFoundError: io/cucumber/cucumberexpressions/ParameterTypeRegistry

I am facing an error when I try to run a simple cucumber feature file using junit. Any help will be awesome.
my feature file
U need to also add cucumber-expressions, datatable and datatable-dependencies jar.
Easier to just use maven to manage dependencies. Just add below dependencies to the POM
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java8</artifactId>
<version>4.4.0</version>
<scope>test</scope>
</dependency>
If u are using junit runner add the cucumber-junit dependency. For testng runner add cucumber-testng.

Caused by: java.lang.NoSuchMethodError: com.datastax.driver.core.TypeCodec.getJavaType()Lcom/google/common/reflect/TypeToken;

I am creating an application using following dependencies, which are all the latest version so far.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M5</version>
</parent>
`<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector_2.10</artifactId>
<version>2.0.5</</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.3.0</version>
</dependency>`
I get this exception
"Caused by: java.lang.NoSuchMethodError: com.datastax.driver.core.TypeCodec.getJavaType()Lcom/google/common/reflect/TypeToken;"
After doing some research, I found the reason is that spark-cassandra-connector_2.10 jar also contains com.datastax.driver class files and it also has TypeCodeC.class but this is different from TypeCodeC.class file in cassandra-driver-core
I have 2 solutions so far.
use maven-shade-plugin to exclude class files from the jar. However, this requires a lot of extra work. And for some reason, only I compile the project to a jar and add this jar as a dependency in my project, then it works. I don't think this is a good solution
I remove /com/datastax/driver folder and files directly from the jar. Use this command
zip -d /Users/cicidi/.m2/repository/com/datastax/spark/spark-cassandra-connector_2.10/2.0.5/spark-cassandra-connector_2.10-2.0.5.jar /com/datastax/driver/*
And it works! Then you need to can add this jar to your project, instead of using maven.(you can use maven on your local, but won't work if you pull the jar from again. )
I don't find any answer on the internet. I know there will be some smart guys fixed this issue. But before that, I am posting this answer to help whoever want to fix this problem immediately.
<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector_2.10</artifactId>
<version>2.0.0-M1</version>
</dependency>
has no version conflict with
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.3.0</version>
</dependency>
According to the question "Why is the Cassandra Java Driver embedded in Spark Cassandra Connector artifacts?" in https://github.com/datastax/spark-cassandra-connector/blob/master/doc/FAQ.md . It's difficult to use these two libraries together. But I try to avoid the problem by explicitly specify the dependencies in my pom.
There are some points to pay attention to:
The cassandra-driver-* must be put before the spark-cassandra-connector. And the 3.1.4 may only work fine with 2.0.0-M1.
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-extras</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector_2.11</artifactId>
<version>2.0.0-M1</version>
</dependency>

download cassansdra jbcd 1.2.3 jar

Can someone give me a link to download the cassandra-jbcd.1.2.3.jar ?
The most recent version I found is cassandra-jbcd.1.2.1.jar and i really need the last version of cassandra for my work.
Please help
Since it's not in their downloads you can build it yourself using the dependency. Create a maven project add the dependency, compile the project and maven will create the jar for you.
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-clientutil</artifactId>
<version>1.2.3</version>
</dependency>
Here is an example build, but I dont think it will be very long before it's out of date again.

Icefaces ACE pie chart SectorSeries class missing

I tried to implement this example:
http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=chartBean
I wanted to import the
org.icefaces.ace.model.chart.SectorSeries
class, it isn't in the jar file.
I use maven, and I added this dependency to the project's pom file
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces-ace</artifactId>
<version>3.0.1</version>
</dependency>
Could someone tell me what I do wrong?
I can't find anywhere the location of this class.
Please help me!
Thanks in advancd
I don't believe that class was not available until version 3.1.0 (not 3.0.1) so you'll need to upgrade your Maven poms to get that release.

Resources