Skip to content

Latest commit

 

History

History
117 lines (91 loc) · 4.07 KB

frequently_needed_stuff.md

File metadata and controls

117 lines (91 loc) · 4.07 KB

collection of frequently needed commands

certificates

get certifiacates and store in keystore

# view certificates
openssl s_client -showcerts -connect my.host.com:443
# store desired ones to a file (myfile.pem)

# then base64 decode it
base64 -d myfile.pem > myfile.cer

# and add to keystore
keytool -import -alias gateway-identity -keystore mykeystore.jks -file myfile.cer

kerberos

  • see contents (principals) of keytab
klist -k keytab.keytab
  • add new user (principal / keytab)
sudo kadmin.local
kadmin.local:  addprinc -randkey <<username>>
kadmin.local:  ktadd -k /etc/security/keytabs/<<username>>.keytab -norandkey <<username>>
sudo chown <<username>> /etc/security/keytabs/<<username>>.keytab
sudo chmod 400 /etc/security/keytabs/<<username>>.keytab
kinit -kt /etc/security/keytabs/<<username>>.keytab <<username>>
klist

ansible

ansible-galacy init rolename

java

  • checking classpath
jar tf foo.jar | grep MyClass
  • reload the service / restart it in case you modify the same class (just to be sure)

big data

starting out it might be a good idea to quickly get something up and running

spark

data sources

aggregations

partition handling

spark on yarn

hive

hdfs shell

  • counting of files in directory hdfs dfs -count -v -h /path/to/data/*

python

yarn

machine learning

categorical handling

cross validation

conversions of data

geospatial data

ambari

1. Log on to ambari server host shell
2. Run 'psql -U ambari-server ambari'
3. Enter password 'bigdata'
4. In psql:
update ambari.users set user_password='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_name='admin'

5. Quit psql
6. Run 'ambari-server restart'

This will reset the admin account back to the password of 'admin'