Can we use snappy in standalone or do we need to use in conjunction with Hadoop? - flume

I want to use snappy to compress files with Java. I have downloaded the required native libraries and provided java.library.path to the folder containing libsnappy.so.1.1.4 file. But still I am getting the following exception.
| ERROR | [SinkRunner-PollingRunner-DefaultSinkProcessor] | com.omnitracs.otda.dte.flume.sink.
hdfs.HDFSEventSink:process(463): process failed org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
at org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy(Native Method) ~[hadoop-common-2.8.5.jar:?]
at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:63) ~[hadoop-common-2.8.5.jar:?]
at org.apache.hadoop.io.compress.SnappyCodec.getCompressorType(SnappyCodec.java:136) ~[hadoop-common-2.8.5.jar:?]
at org.apache.hadoop.io.compress.CodecPool.getCompressor(CodecPool.java:150) ~[hadoop-common-2.8.5.jar:?]
at org.apache.flume.sink.hdfs.HDFSCompressedDataStream.open(HDFSCompressedDataStream.java:97) ~[flume-hdfs-sink-1.9.0.jar:1.9.0]

Related

Error while migrating data from Neo4j to OrientDb

I'm getting the following error while importing the data from Neo4j.
OrientDb server is not running as per the documentation.
[cloud_user#xxxxxxx bin]$ ./orientdb-neo4j-importer.sh -neo4jlibdir ~/neo4j-community-3.4.7/lib/ -neo4jdbdir ~/backup_files/graph.db/
Neo4j to OrientDB Importer v.3.0.10 - Veloce (build eac0654847df662ca03b45a6a5efa5eadd229ca5, branch 3.0.x) - Copyrights (c) 2017 OrientDB LTD
WARNING: 'o' option not found. Defaulting to 'false'.
WARNING: 'i' option not found. Defaulting to 'false'.
WARNING: 'odbdir' option not found. Defaulting to '/opt/orientdb/databases/neo4j_import'.
Please make sure that there are no running servers on:
'/home/cloud_user/backup_files/graph.db' (Neo4j)
and:
'/opt/orientdb/databases/neo4j_import' (OrientDB)
Initializing Neo4j...Done
Initializing OrientDB...Exception in thread "main" java.lang.NoClassDefFoundError: com/tinkerpop/blueprints/impls/orient/OrientGraphFactory
at com.orientechnologies.orient.neo4jimporter.ONeo4jImporterInitializer.invoke(ONeo4jImporterInitializer.java:94)
at com.orientechnologies.orient.neo4jimporter.ONeo4jImporter.execute(ONeo4jImporter.java:108)
at com.orientechnologies.orient.neo4jimporter.ONeo4jImporterMain.main(ONeo4jImporterMain.java:25)
Caused by: java.lang.ClassNotFoundException: com.tinkerpop.blueprints.impls.orient.OrientGraphFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
[cloud_user#xxxxxxx bin]$
I struggled for more than 2 hours trying to import data from Neo4j to Orientdb. The documentation is quite sloppy.
You can solve this issue by downloading the jar- orientdb-graphdb-*.jar into lib folder. However, you still might face the other issues of missing classes.
Downloading jars below helped to resolve such issues:
blueprints-core-*.jar
gremlin-groovy-3.3.4.jar
Let me know if you still face class missing issues.
Hope that saves someone's time.
OrientDB does not contain all of the necessary libraries it needs to perform this task by default. Often, you can define submodules to be imported in a pom file, but if you aren't using a Java application, then you need to import these libraries yourself into the lib/ folder of your OrientDB home directory.
To get the importer to work download the following JAR files and move them into the lib/ folder:
- orientdb-graphdb
- Tinkerpop Blueprints Core
- Gremlin Groovy

Julia use of JLD: WARNING: Module HDF5 uuid did not match cache file

When I run using JLD I get the following warnings:
INFO: Recompiling stale cache file C:\Julia\PkgDir\lib\v0.4\JLD.ji for module JLD.
WARNING: Module HDF5 uuid did not match cache file
This is likely because module HDF5 does not support precompilation but is imported by a module that does.
WARNING: deserialization checks failed while attempting to load cache from C:\Julia\PkgDir\lib\v0.4\JLD.ji
INFO: Precompiling module JLD...
INFO: Recompiling stale cache file C:\Julia\PkgDir\lib\v0.4\JLD.ji for module JLD.
WARNING: Module HDF5 uuid did not match cache file
This is likely because module HDF5 does not support precompilation but is imported by a module that does.
__precompile__(true) but require failed to create a precompiled cache file
If I then run say:
A=ones(40)
save("c:\\OneDrive\\Model\\myfile.jld", "A", A)
I get the error:
UndefVarError: save not defined in include_string at loading.jl:288 in eval at
C:\Julia\PkgDir\v0.4\Atom\src\Atom.jl:3 [inlined code] from
C:\Julia\PkgDir\v0.4\Atom\src\eval.jl:39 in anonymous at
C:\Julia\PkgDir\v0.4\Atom\src\eval.jl:108 in withpath at
C:\Julia\PkgDir\v0.4\Requires\src\require.jl:37 in withpath at
C:\Julia\PkgDir\v0.4\Atom\src\eval.jl:53 [inlined code] from
C:\Julia\PkgDir\v0.4\Atom\src\eval.jl:107 in anonymous at task.jl:58
I'm using Atom 1.8.0 and Julia 0.4.7. I'm using JLD as, to the best of my knowledge, it's the only pkg that allows me to write variables to file and preserve all of their attributes.
I had a similar issue with JLD at one point and running Pkg.update() fixed it. Updating to the latest stable Julia version before running the package update could also be helpful.

MobileFirst Server - Application Center Configure Ant Task (configure-appcenter-liberty-mysql.xml) Error

I'm trying to install & configure the application center for MobileFirst Server using the ant task to install. Prior to the install task I was able to use the database task to create necessary tables in the app center database.
I get the error mentioned in the logs below when running
ant -f configure-appcenter-liberty-mysql.xml install
Ref
https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.installconfig.doc/appcenter/t_ac_deploy_cons_serv_ant_tasks.html?lang=en
Ant Script Output
root#ubuntu:/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples# sudo ant -v -f configure-appcenter-liberty-mysql-edited.xml install
Apache Ant(TM) version 1.9.3 compiled on April 8 2014
Buildfile: /opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples/configure-appcenter-liberty-mysql-edited.xml
Detected Java version: 1.7 in: /usr/lib/jvm/java-7-openjdk-amd64/jre
Detected OS: Linux
parsing buildfile /opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples/configure-appcenter-liberty-mysql-edited.xml with URI = file:/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples/configure-appcenter-liberty-mysql-edited.xml
Project base dir set to: /opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples
parsing buildfile jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `install' is [install]
Complete build sequence is [install, help, minimal-update, databases, uninstall, ]
install:
[installApplicationCenter] Logging output of task <installApplicationCenter> to file /root/.mobilefirst_platform_server/configuration-logs/installApplicationCenter_2016_04_20_22_42_09.log
[installApplicationCenter] Copying /opt/IBM/MobileFirst_Platform_Server/tools/mysql-connector-java-5.1.38/mysql-connector-java-5.1.38-bin.jar to /opt/IBM/WebSphere/Liberty/usr/shared/resources/mysql/mysql-connector-java-5.1.38-bin.jar
[installApplicationCenter] Copying /opt/IBM/MobileFirst_Platform_Server/tools/mysql-connector-java-5.1.38/mysql-connector-java-5.1.38-bin.jar to /opt/IBM/WebSphere/Liberty/usr/shared/resources/mysql/mysql-connector-java-5.1.38-bin.jar
[installApplicationCenter] Copying /opt/IBM/WebSphere/Liberty/usr/servers/simpleServer/server.xml to /opt/IBM/WebSphere/Liberty/usr/servers/simpleServer/server.xml.bak2
[installApplicationCenter] Modifying /opt/IBM/WebSphere/Liberty/usr/servers/simpleServer/server.xml
[installApplicationCenter] Deleting /opt/IBM/WebSphere/Liberty/usr/servers/simpleServer/server.xml.bak2
BUILD FAILED
/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples/configure-appcenter-liberty-mysql-edited.xml:74: An error occured while reading file /opt/IBM/WebSphere/Liberty/usr/servers/simpleServer/server.xml. Error: null.
at com.ibm.worklight.config.ant.appserver.AppCenterAppServerTask.wasLibertyAugmentConfigFiles(AppCenterAppServerTask.java:654)
at com.ibm.worklight.config.ant.appserver.AppServerTask.configureAppServer(AppServerTask.java:4423)
at com.ibm.worklight.config.ant.appserver.AppServerTask.installItems(AppServerTask.java:4165)
at com.ibm.worklight.config.ant.appserver.AppCenterAppServerTask.installItems(AppCenterAppServerTask.java:1143)
at com.ibm.worklight.config.ant.appserver.AppServerTask.processItems(AppServerTask.java:4114)
at com.ibm.worklight.config.ant.appserver.AppCenterAppServerTask.buildAndProcessItems(AppCenterAppServerTask.java:1088)
at com.ibm.worklight.config.ant.appserver.AppServerTask.setupBuildAndProcessItems(AppServerTask.java:3064)
at com.ibm.worklight.config.ant.appserver.AppServerTask.doExecute(AppServerTask.java:307)
at com.ibm.worklight.config.ant.appserver.InstallApplicationCenterTask.execute(InstallApplicationCenterTask.java:28)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.NullPointerException
at com.ibm.worklight.config.helper.appserver.WASLibertyAugmentServerXML.addAppCenterApplicationAndDataSourceElements(WASLibertyAugmentServerXML.java:1921)
at com.ibm.worklight.config.helper.appserver.WASLibertyAugmentServerXML.mainInstallApplicationCenter(WASLibertyAugmentServerXML.java:143)
at com.ibm.worklight.config.ant.appserver.AppCenterAppServerTask.wasLibertyAugmentConfigFiles(AppCenterAppServerTask.java:642)
... 25 more
Total time: 7 seconds
Just based on the name of the Ant file you're using, and the pathnames displayed in in the message output you included, it looks like you started from the wrong sample Ant file - in other words, it appears that you are using Liberty Profile as your application server, but you started from the sample Ant file for use with WebSphere Application Server.
Assuming that is in fact the case, you should start with the sample configuration file "configure-appcenter-liberty-mysql.xml" instead.
Also, just as a hint - it appears that even with the file you are using, you modified the sample Ant file provided with MobileFirst Platform Foundation 7.1 "in place" and wrote it back to it's original filename and used it? As mentioned in the documentation link you have in your question, it's actually recommended to make a copy of this file and work with the copy, rather than modifying the one we provide - that way, you'll always have the unmodified samples we provide, in case you want to refer to them, or use them as templates for a different server and/or different configuration.
I think you use Liberty Profile 8.5.5.9. There were some changes concerning the password decoding mechanism in this version that is no more compatible with MobileFirst.
Either you ask the IBM support for the APAR http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1PI61386, either you use Liberty 8.5.5.8.

Grails 2.2.2 Compilation Errors: ThreadGroupContext beaninfo

I am using Grails 2.2.2 with GGTS 3.3M1. When I run my app (grails run-app) and change something in a groovy file then Grails recompiles the file. During this process the following error output occurs:
| Error Unexpected problem clearing ThreadGroupContext beaninfo:
| Error java.lang.ClassCastException: java.beans.WeakIdentityMap cannot be cast to java.util.Map
| Error at org.springsource.loaded.agent.JVMPlugin.reloadEvent(JVMPlugin.java:77)
| Error at org.springsource.loaded.TypeRegistry.fireReloadEvent(TypeRegistry.java:1594)
| Error at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:396)
| Error at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:805)
| Error at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:51)
| Error at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:218)
| Error at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:205)
| Error at java.lang.Thread.run(Thread.java:722)
Reloading: JVMPlugin: warning: unable to clear BEANINFO_CACHE, cant find field
The compilation seems to work fine but the error still occurs.
This is because you are on JDK 1.7 update 21. Something 'moved' in the JDK at that version and the state clearing logic needs updating in springloaded. This is already fixed in the springloaded codebase but won't be in a new grails version for a little while. Older versions of JDK 1.7 would be fine. You can ignore the message, but it means some state was not cleared when a type was reloaded - and this means it may look like it hasn't reloaded some of the changes you might make to your types.

Grails Update Dependencies : Error Compilation error: startup failed | Compile error during compilation with javac

I am trying to run a grails 2.1.1 web app. While checking out the project from the SVN repo, it tries to do an update dependencies and fails with the following error:
| Loading Grails 2.1.1
| Configuring classpath
| Error SLF4J: Class path contains multiple SLF4J bindings.
| Error SLF4J: Found binding in [jar:file:/Users/sm026588/.grails/ivy-cache/org.grails/grails-plugin-log4j/jars/grails-plugin-log4j-2.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
| Error SLF4J: Found binding in [jar:file:/Users/sm026588/.grails/ivy-cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
| Error SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
| Configuring classpath.
| Environment set to development.....
| Compiling 45 source files.
| Error Compilation error: startup failed:
Compile error during compilation with javac.
error: error reading /Users/../.grails/ivy-cache/com....intent/intent-processing-protobuf/jars/intent-processing-protobuf-2.10.2.jar; cannot read zip file entry
1 error
1 error
I have tried deleting the jar and re-run "refresh dependencies", did not work. Tried to see if the jar file could be unzipped, and I could unzip it successfully, which tells me that the jar is not corrupt. Tried with Eclipse Juno, STS and Eclipse Indigo on Mac OS X, all of them give the same error. Have been stuck at this point for quite sometime, any help would be appreciated.

Resources