Skip to content

Instantly share code, notes, and snippets.

# hdfs
hdfs version
hdfs namenode -format // IMPORTANT: format the DFS filesystem
# hadoop
hadoop fs -ls <dfs-path>
hadoop fs -cat <dfs-path>
hadoop fs -get <dfs-path>
hadoop fs -put <local-path> <dfs-path>
hadoop fs -mkdir <dfs-path>
# base
CDH is Cloudera Distribution Hadoop
HDP is Hortonworks Data Platform
CDP is Cloudera Data Platform
=> ref: https://www.facebook.com/athemaster.com.tw/posts/1549152648578324
# zeppelin
jps | grep ZeppelinServer
cat /var/run/zeppelin/zeppelin-zeppelin-sandbox-hdp.hortonworks.com.pid
cat /var/lib/ambari-agent/cache/common-services/ZEPPELIN/0.7.0/package/scripts/service_check.py
# base
one workspace can contain multi projects
# common
ng // list available commands
ng version
ng new --help
ng new <workspace-name>
ng new <workspace-name> --defaults
ng new <workspace-name> --directory ./
# [note] learn
=> ref: https://www.bilibili.com/video/BV1m441197h9
=> ref: https://www.bilibili.com/video/BV1PV411774y
# bash command
vim // open a blank file
vim <file-path> // open a file (if no exist, when :w will create)
vim <file-path> +<line-number> // open a file and go to assigned line number
vim . // open the current directory and select file
# command mode (default mode)
: // switch to ex mode
i // insert, switch to insert mode
a // append, switch to insert mode
# base
devops (development, operations)
cicd (continuous integration, continuous deployment)
=> ref: https://www.bilibili.com/video/BV1zf4y127vu
# workflow
developer gitlab jenkins
|push---------->| |
| |webhook------->|
| | |trigger
# base
mysql --help
mysql // user: root, host: localhost
mysql -u <user> [-p] [password]
mysql -u <user> [-h] [host]
# mysql shell
## common
status;
select version();
# intro.
AzureRM (Azure Resource Manager)
Az (new module, recommended)
after the verb will have 'Az' prefix
# base
Connect-AzAccount
Get-AzContext
# resource group
# base
az // welcome
az -h // -h <=> --help, there are "Group", "Subgroups", "Commands"
az -v // -v <=> --version
az version // show the versions of azure cli modules and extensions in JSON format by default or format configured by --output
az login // log in to azure
az logout // log out to remove access to azure subscriptions
az account -h // there are "Group", "Subgroups", "Commands"
az account lock -h // there are "Group", "Commands"
az account list -h // there are "Command", "Arguments", "Global Arguments"
---
>php --version
PHP 7.4.16 (cli) (built: Mar 2 2021 14:06:15) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
>composer --version
Composer version 2.2.5 2022-01-21 17:25:52
---