Skip to main content

Recursively searching log files of an EMR cluster

Posted in

Investigation log files on an EMR cluster can be sometimes very hard. If you want to grep recursively in all .gz files (controller, stderr, stdout, ...), you can use:

$ find -name \*.gz -print0 | xargs -0 zgrep "#WORD_TO_SEARCH#"

Copying a directory from a S3 bucket A in account X to a S3 bucket B in account Y on AWS

Posted in

I had some issues copying data from bucket A to bucket B. Both of the buckets were in different AWS accounts. Copying of data was going fine, but on the target side, I never had the permissions to read the copied data.

I forgot to include the --acl property in my copy command

--acl (string) Sets the ACL for the object when the command is performed. If you use this parameter you must have the "s3:PutObjectAcl" permission included in the 
list of actions for your IAM policy. Only accepts values of private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-
owner-full-control and log-delivery-write. See Canned ACL for details

So the command I've executed:

$ aws s3 cp --recursive --acl authenticated-read s3://#BUCKET_A#/#PATH_TO_DIR# s3://#BUCKET_B/#PATH_TO_DIR#

Adding GIT branch in PS1 on terminal

Posted in

I've updated my PS1 variable to the content below. By doing this change, I'm printing the GIT branch I'm currently working on. As I am working on different projects, it helps me indicating if I'm working on the correct branch for a specific project or not:

Original value:


New value:

So the part I've added (first block indicates the yellow color, second block executes the __git_ps1 command)


Using deployed packages instead of development projects in Eclipse

Posted in

Even though the Maven Eclipse plugin is retired, I still like using this plugin. There's sometimes one issue with the connection of projects in your Eclipse workspace.

By default, the Eclipse Plugin will create sub-projects for dependencies that exists in the reactor. If you don't want to work with the development code and prefer to use the deployed packages, you can still do so by disabling the project references like so:

mvn eclipse:eclipse -Declipse.useProjectReferences=false

Source: Prevent Project References

Changing keyboard layout from QWERTY to AZERTY at login screen on Windows 7

Posted in

I had the problem on a Windows 7 VM installation the keyboard layout was always set to QWERTY at the login screen. Once logged in, everything was AZERTY. So keyboard settings were configured correctly.

I solved the issue by updating the following registry entry:

HKEY_USERS\.DEFAULT\Keyboard Layout\Preload

Change the value to 00000813 (it was set to 00000419 in my case)

Syndicate content