Author: Mariusz Antonik

Hadoop commands

List of command for hadoop List of files and directories hadoop fs -ls / List of files under user hadoop fs -ls /user Put file to hadoop hadoop fs -put text.txt /user/training/text.txt View file content hadoop fs -cat /user/training/text.txt Remove Read More

Angular CLI

Install application ng new my-app ng new my-app –dry-run ng new my-app –skip-install ng new –help Options ng new my-app –skip-install –style scss –prefix ma –skip-git –skip-test –routing ng lint –help

Epel repository – yum update error

When installing epel repository in centos in some conditions there is an error during yum update. This is an epel repository bug https://bugs.centos.org/view.php?id=12597 Solution Work around applied: In /etc/yum.repos.d/epel.repo, commented out the following lines; #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch Enabled baseurl lines in configuration Read More

Tomcat enable special character in request

To allow pass parameter as json request enable allow characters “{}” in tomcat configuration file catalina.properties    # Allow for changes to HTTP request validation # WARNING: Using this option will expose the server to CVE-2016-6816 #tomcat.util.http.parser.HttpParser.requestTargetAllow=| # tomcat.util.http.parser.HttpParser.requestTargetAllow={}

String formating

Format Flags: Space, + and ( format position of output text base of flags s1= String.format(“%d”,123); s2= String.format(“%d”,-123); s3= String.format(“% d”,123); s4= String.format(“% d”,-123); s5= String.format(“%+d”,123); s6= String.format(“%+d”,-123); s7= String.format(“%(d”,123); s8= String.format(“%(d”,-123); s9= String.format(“% (d”,123); s9 is using combined flags, Read More

java update

Download java.tar.gz file Unzip to /usr/java/jdkVERSION Create link for latest and default Use alternative to setup default java envirement See your current envirement alternatives –config java There is 1 program that provides ‘java’. Selection Command ———————————————– *+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/java) Read More