When I run a single class of scala with Spark in IDEA, an error happens: java.lang.NoClassDefFoundError: org/apache/spark/SparkContextat java.lang.Class.getDeclaredMethods0(Native Method)at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)at java.lang.Class.privateGetMethodRecursive(Class.java:3048)at java.lang.Class.getMethod0(Class.java:3018)at java.lang.Class.getMethod(Class.java:1784)at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)Caused by: java.lang.ClassNotFoundException: org.apache.spark.SparkContextat java.net.URLClassLoader.findClass(URLClassLoader.java:382)at java.lang.ClassLoader.loadClass(ClassLoader.java:424)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)at java.lang.ClassLoader.loadClass(ClassLoader.java:357)… 7 moreError: A JNI error has occurred, please check your installation and try againException in thread “main”Process finished with exit code 1 Open…
IDEA 中 Excluded后解除
今天在IDEA中,一个目录被Excluded后,想要再次加入项目,怎么操作都不行,最后打开项目根目录下的 项目.iml文件,删除了其中的 <excludeFolder url=”file://$MODULE_DIR$/XXXX/builder” /> 后,builder目录恢复正常。
Shell sed 操作xml
shell sed 命令操作xml,有一个xml文件:a.xml 删除包含指定内容的行:删除 a.xml 中节中包含字符串: Name=”DataLine 的行,就是删除名字为 Name=”DataLineXXXXXX的行。 使用shell sed 命令在指定的内容前添加一行新的内容:
Java VS Scala
Operations Java Scala for for(int i=0;i<1;i++){System.out.print(i);}
Shell VS PHP
Bash PHP Comments Variables Operators Logical if else for String Boolean Numeric Calculate Echo & print Function Array File Net
MySQL and Oracle SQL
Desc MySQL Oracle show create table show create table TABLE_NAME select table_name,dbms_metadata.get_ddl(‘TABLE’,’TABLE_NAME’)from dual,user_tables where table_name=’TABLE_NAME’; select table select * from dba_tables where table_name=’TABLE_NAME’ select db link select * from user_db_links;select * from dba_db_links; create table when not exists declare already_exists exception; columns_indexed exception; pragma exception_init( already_exists, -955 ); pragma exception_init(columns_indexed, -1408);begin execute immediate ‘create table MAPPING_LINKS( SOURCE_ID NUMBER(10,0), LINK(10,0) )’; execute…
英文符号读法
符号 读法 , comma 逗号 . period, dot 句号,点 ? question mark ! exclamation mark (英式英语) exclamation point (美式英语) @ At sign, at # pound, number signs 井号 $ dollar % percent 百分号 ^ Caret & ampersand, and, reference, ref 和,引用 * asterisk, multiply, star, pointer 星号,乘号,星,指针 ( ) brakets/ parentheses 括号 – minus, hyphens 减号;负号 _ underscore (下划线) + plus 加号;正号 =…
KOPS Create cluster on AWS Global
[ec2-user@ip-172-31-22-49 ~]$ dig ns dev.heoffice.com ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.62.rc1.56.amzn1 <<>> ns dev.heoffice.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64454;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION:;dev.heoffice.com. IN NS ;; ANSWER SECTION:dev.heoffice.com. 172800 IN NS ns-0.awsdns-00.com.dev.heoffice.com. 172800 IN NS ns-1024.awsdns-00.org.dev.heoffice.com. 172800 IN NS…
编译KOPS
1 cd kops/kops/2 ls3 vi upup/pkg/fi/cloudup/template_functions.go4 kops5 cd6 wget https://golang.org/dl/go1.17.1.linux-amd64.tar.gz7 sudo rm -rf /usr/local/go &&sudo tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz8 export PATH=$PATH:/usr/local/go/bin9 which go10 go version11 mkdir kops12 cd kops13 export GOPATH=pwd14 git clone https://github.com/kubernetes/kops.git15 git fetch –all16 cd kops/17 git fetch –all18 git checkout -b release-1.20 origin/release-1.2019 vi upup/pkg/fi/cloudup/template_functions.go20 sudo apt install npm21 sudo…