rhive.connect error: cannot modify RHIVE_UDF_DIR - r

I am trying to connect to Hive from R with the latest RHive package in HDP 2.4. The installation seemed to have gone smoothly, since I was able to call the library of RHive. When I execute
rhive.connect(host="192.168.56.101",port=10000, hiveServer2=TRUE)
I got this error message:
Cannot modify mapred.child.env at runtime. It is not in list of params that are allowed to be modified at runtime.
After some googling around, I added the following to the /etc/hive/conf/hive-site.xml file:
<property>
<name>hive.security.authorization.sqlstd.confwhitelist.append</name>
<value>mapred.child.env</value>
</property>
After restarting hive-server2, the original error message is now replaced by this one:
Cannot modify RHIVE_UDF_DIR at runtime. It is not in list of params
that are allowed to be modified at runtime.
I tried adding RHIVE_UDF_DIR right next to map.child.env, like this:
<property>
<name>hive.security.authorization.sqlstd.confwhitelist.append</name>
<value>mapred.child.env,RHIVE_UDF_DIR</value>
</property>
But this did not resolve the problem; it brought back the original error message that I was getting at the very beginning. Any thoughts on this? Thanks in advance!

I know this is late reply but I just came across this thread. Using java regex instead of comma separated would work. This worked for me this morning.
Config parameter should be added under hive-site.xml
hive.security.authorization.sqlstd.confwhitelist.append=mapred\.child\.env|RHIVE_UDF_DIR
Ps: Backslash was not displaying above so adding screenshot link.
config parameter with proper java regex for values

Related

Uploading manifest file failing

After making some changes in a JSON manifest file, I was trying to update it following the Amazon documentation:
ask smapi update-skill-manifest -g development -s amzn1.ask.skill.xxxx --manifest "skillManifest.json" --debug
I kept getting this error:
The error was not pointing to what the error was but my guess was that it was related to the parameters, but that was strange as I was following the documentation to letter.
I then tried, instead of passing the json file, to cat the content of the file, which would be either:
For Powershell: --manifest "$(type skillmanifest.json)"
For Linux: --manifest "$(cat skillmanifest.json)"
I still kept getting the same error.
Firstly, for debugging and getting a more accurate error, I checked my ASK-CLi version, which was outdated.
After updating ASK to the latest version I was still getting the same error.
At that point it started including an error object, which was saying:
When looking into Parsing error due to invalid body. and INVALID_REQUEST_PARAMETER through the error codes, it just said the body of the request cannot be parsed.
After research and playing around, the problem was the manifest parameter, changing it to "file:FILENAME" solved the issue:
--manifest "file:skillmanifest.json"
The documentation is not stating this but it seems necessary for it to go through.
I hope this helps someone out there avoid spending a full day troubleshooting.

Neo4j spatial server plugin fails on withinDistance and closest java.lang.NoClassDefFoundError

I know that the plugin is being loaded properly, as other methods work such as spatial.procedures and spatial.addNode etc.
The error results after a call like this:
CALL spatial.withinDistance('profile_geo', [43.524, 96.7341], 500)
and the error that results is this:
Failed to invoke procedure `spatial.withinDistance`: Caused by: java.lang.NoClassDefFoundError: org/neo4j/cypher/internal/compiler/v3_0/commands/expressions/GeographicPoint
The same error appears when trying to use the closest function as well. Any help would be appreciated.
It looks that you are missing required Jar for GeographicalPoint class.
Please make sure you have this class in your Jars. I know this class exists in neo4j-cypher-compiler-3.0-3.0.3.jar but it is not going to work for you as it is residing in different namespace. If you will not be able to pinpoint the corresponding Jar in your environment please have a look at Maven repository and try to find it there.
short answer: upgrade to 3.0.3 (both neo4j and plugin)
long answer:
I ran into the exact same issue today. I was running version 3.0.2 with server plugin version 3.0.2 and ran the cypher query:
CALL spatial.withinDistance("spatial_records",{lon:20.0,lat:50.0},100000000)
Joran mentioned in the comments above that the REST API was a working alternative. So I tried that out and found he was indeed correct.
I tested this using httpie, with the following command:
cat tmp.json | http :7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesWithinDistance
where tmp.json looks like:
{"layer" : "spatial_records","pointX" :3.9706,"pointY" : 46.7907,"distanceInKm" :10000000000}
While this works, using CYPHER with stored procedures would be nice. So upon further investigation, I noticed that a recent commit contained the following changes:
- <neo4j.version>3.0.1</neo4j.version>
+ <neo4j.version>3.0.3</neo4j.version>
...
-import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.GeographicPoint;
+import org.neo4j.cypher.internal.compiler.v3_0.GeographicPoint;
So I ended up downloading version 3.0.3 of both neo4j and the spatial plugin. Whatever the issue was before, seems to be fixed in this version. The call to the stored procedure now works as expected!

Cannot find name 'console'

I am using Angular2-Meteor, TypeScript. (Meteor version 1.3.2.4)
When I use console.log('test'); on the server side, it is working well.
However, I got this warning in my terminal:
Cannot find name 'console'.
How can I get rid of this warning?
Or is there any special method such as Meteor.log for server side? Thanks
How can I get rid of this warning?
if its a TypeScript compiler warning (and not a runtime one) then console is defined in lib.d.ts : https://basarat.gitbooks.io/typescript/content/docs/types/lib.d.ts.html
Make sure that the compiler is setup correctly (e.g. doesn't have --noLib or some custom incorrect --lib). You might want to look at your tsconfig.json's compilerOptions (if any)
#barbatus who is main contributor for angular2-meteor, gave the answer on Github.
The issue is in that TypeScript package uses lib.core.ts default lib on the server side which doesn't have definitions for console. NodeJS definitions from other side as now defines console in the global scope only (i.e. global.console).
The solution is running this in your terminal:
typings install registry:env/meteor --ambient
Please go here for more details.

MSDeploy Parameter

I am trying to pass application pool password as a command line argument to msdeploy.exe. Also, I am passing setParameter file as another command line agrument. The overall command line looks like this
msdeploy.exe -verb:sync -source:package=D:\package.zip,encryptPassword="password" dest:auto,computername=mycompuetrname -setParam:name="AppPoolPassword",value="mypassword" -setParamFile="D:\Test.setParameters.xml"
Other things to be noted, Test.setParameters.xml file does NOT have AppPoolPassword param, because I want to pass that as command line as mentioned above.
When I execute the above command, I get an error which says "ApplicationPoolPassword cannot be null". If I do not specify the parameters.xml file but just specify AppPoolIdentity and AppPoolPassword on the command line the command is successful and creates the necessary web site structure.
My question is does setParamFile overrides the -setParam command line paramters? I did google search but did not find anything which confirms that. Anyone who has experienced this, please help.
Thanks
Regarding setParamFile overriding setParam, you've got it backwards. The setParam parameter takes precedence over the setParamFile.
Regarding the error, it looks like your parameter names are off. The error references parameter name "ApplicationPoolPassword". Your command is using the parameter name "AppPoolPassword". Try changing the command to use the name "ApplicationPoolPassword".

Issues in running R from Perl

I want to include Statistics::R for my program.
The statement I am including is:
use Statistics::R;
Is there something wrong with it?
I tried to run it with just this statement included, the error i got was
Can't locate Statistics/R.pm in #INC(#INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at rperl.pl line 2
By the way I am using perl(v5.14.2) on ubuntu,using remote access to a linux server.
The solution was to install the module as non-root user.
The details are provided in the following link:
http://users.soe.ucsc.edu/~you/notes/perl-module-install.html
After doing the things described here, a couple of small steps are to be completed which are mentioned in the following link:
http://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations
This worked for me! I hope it would be of help to others too!

Resources