Skip to main content

Posts

Deploy Code to Production

 

How to set priorities

 

Mixed Java and Scala Maven Projects

  To compile code with mixed Java & Scala classes, add following to pom.xml  <build> <pluginManagement> <plugins> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>4.8.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <executions> <execution> <id>scala-compile-fi

Spark Phoenix Error org.apache.phoenix.exception.PhoenixIOException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService!

  Exception -  Caused by: org.apache.phoenix.exception.PhoenixIOException: Can't find method newStub in org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService! at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:138) at org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:1652) at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1462) at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1913) at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:3074) Solution -  This error is due to HBase & Phoenix Jar mismatch. Execute Spark-Submit with --verbose option for debugging.  Remove all HBase Jars from classpath. And, just add phoenix shaded Jar to classpath.

Maven Build Failure java.lang.UnsatisfiedLinkError: /tmp/jna/jna.tmp

  Exception  Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:4.3.0:compile failed: An API incompatibility was encountered while executing net.alchim31.maven:scala-maven-plugin:4.3.0:compile: java.lang.UnsatisfiedLinkError: /tmp/jna-1459455826/jna3448139317501565807.tmp: /tmp/jna-1459455826/jna3448139317501565807.tmp: failed to map segment from shared object: Operation not permitted Solution -  Set -Djna.tmpdir to any other directory, other then /tmp, which has execute permissions.