YarnRuntimeException file doesnt exist - hadoop

I'm trying to run a Pig script, getting the error org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.yarn.exception.YarnRuntimeException): java.io.FileNotFoundException: File /tmp/hadoop-yarn.staging/history/done/2015/01/08/000000 does not exits !!!
what does that mean ? shoudl I create it ? where should I put it ?

I ran into the same problem today and found out YarnRuntimeException is included in the hadoop-yarn-api-2.6.0.jar file. Make sure it's in your class path and you should be good.

Related

Why am I getting error code 135 when applying patch through opatch?

I am trying to write a script that automates opatch, but before I get into the actual scripting I want to test the commands directly through the command prompt. My oracle home is C:\oracle\Middleware, and my patch 23094292 folder is located in the Middleware folder. Here are the commands I am using to apply the patch:
cd C:\oracle\Middleware\23094292
C:\oracle\Middleware\OPatch\opatch apply
When I run the latter command I get this:
ZOP-51: The patch location is not valid for apply, because it doesn't have correct metadata, or it points to a patch directory.
Argument(s) Error... Patch location is not valid for apply
Please check the arguments and try again.
OPatch failed with error code = 135
Shouldn't oracle home be the valid patch location? I am not too familiar with Oracle's product's, so I'm not certain. Please let me know if I can provide any further information. Any help explaining what I am doing wrong would be greatly appreciated.
You're missing a directory in the 23094292 directory. There should be two directories in there, "files" and "etc". And then there should be a "README.txt" file there as well.
Edit: I'd just suggest removing the 23094292 directory and unzipping the zip file again, or re-download it if that doesn't work.

How could I do a massive install of a PrestaShop module?

I have a problem, I have to do a massive install of a custom PrestaShop module on 1500 e-commerce, but I don't know if this is possible, I was thinking to include a file called install.php and run through a.sh, this file may contain the next.
For example:
<?php
include "meli.php";
$meli = new Meli();
$meli->install();
?>
I called this file and initially, nothing happened so I check the possible reason and was:
if (!defined('_PS_VERSION_'))
exit;
So I commented this and run it again but this show me this error:
Fatal error: Class 'Module' not found in /home/dev2al5/public_html/modules/meli/meli.php on line 7
Does someone know how I can do this process?
Indeed I would do 3 things in the SH script:
Copy of the modules files in each site in the modules folder
Copy of a sql file containing the instructions to be executed
Calling a URL present in each module that would execute the SQL and then delete the SQL file in question
Regards

Storage::move giving “File not found at path:”

I am trying to move an image from one folder into another folder by using:
Storage::move(storage_path('app/public/temporary/').$imageName, storage_path('app/public/profilePic/'.$imageName));
But when i run it gave me the error:
File not found at path: home/vagrant/code/avida/storage/app/public/temporary/5bfb7272e9dc9.download.jpeg
i google and found the following solution:
Storage::disk('local')->move(storage_path('app/public/temporary/').$imageName, storage_path('app/public/profilePic/'.$imageName));
but then it gave another error:
Method 'disk' not found in \Illuminate\Support\Facades\Storage
Can anyone please help me how can i move this file ?
Thank you
Storage class operate in storage directory so there is no need to use storage_path() helper.
Change your code to the one below:
Storage::move('public/temporary/'.$imageName, 'public/profilePic/'.$imageName);
I hope that helps :)

E0611 error on import when I know the file exists

With pylint, I'm getting an E0611 error on an import when I know the file exists and the script runs fine. Suggestions? I annotated the image below with the error.
Try this:
In VS Code Preferences > Settings, change the "python.linting.pylintPath" to the virtual env path "/bin/pylint"
https://github.com/Microsoft/vscode-docs/blob/master/docs/python/linting.md
Removing all ignored files (in the __pycache__-folder, etc.) using the command git clean -dfx fixed the issue for me. (Warning: Ensure you do not have any important git-ignored files which you want to keep before executing this command.)

How to move jar file from one folder to another in Ruby?

In my Ruby script I have to copy one jar file from lib to a different location. Below is the piece of code where I am trying to do so:
FileUtils.mv("#{$HOME_PATH}/lib/myjar1.jar", "#{$HOME_PATH}")
But it is not able to move the jar file to destination. I am seeing the following error:
No such file or directory - file:/home/path/lib/myjar1.jar or file:/home/path/myjar1.jar
I double checked that myjar1.jar is present in source directory. Not sure why I am seeing that error.
I also tried using FileUtils.cp_r("#{$HOME_PATH}/lib/myjar1.jar", "#{$HOME_PATH}") and I am seeing the following error: unknown file type: file:/home/path/lib/myjar1.jar.
Any guidance in copying or moving a jar file is appreciated.
Im assuming you are starting from your home directory (hence the $HOME_PATH). I prefer to use the given ENV hash in IRB.
In IRB this works in MAC OSX:
>> FileUtils.mv("#{ENV['HOME']}/Desktop/my.jar", "#{ENV['HOME']}")
0
The FileUtils#mv method returns 0 as that is the return code of the Unix version of mv which just means it was successful.

Resources