private fun dataframe(list: List): Dataset { return SQLContext(SparkUtil.instance()) .createDataFrame(list, Data::class.java) .toDF() } object SparkUtil { fun instance(name: String? = ""): SparkSession { return make(name!!) } private fun make(name: String): SparkSession { return config( SparkSession.builder().appName(name) ).enableHiveSupport().orCreate } private fun config(builder: SparkSession..
public class ReverseString { public static void main(String[] args) { String str = "abcde"; StringBuffer sb = new StringBuffer(str); String reversedStr = sb.reverse().toString(); System.out.println(reversedStr); // edcba } } 출처: https://yangbox.tistory.com/59 [양's World:티스토리]
1. MSLAB(MemStore-local allocation buffer) Memstore 하나당 2MB Heap 공간 필요 2. 많은 수의 Compaction https://starblood.tistory.com/entry/HBase-%EC%97%90%EC%84%9C-region-%EC%88%98%EB%A5%BC-%EC%9E%91%EA%B2%8C-%ED%95%B4%EC%95%BC-%ED%95%98%EB%8A%94-%EC%9D%B4%EC%9C%A0 HBase 에서 region 수를 작게 해야 하는 이유 Region 수는 보통 Region Server 당 100개 정도가 적당하다. HBase 의 region 수를 작게 하는대에는 아래와 같은 이유가 있다. 1. MSLAB (MemStore-local al..
fun drop(table: String) { val spark = SparkUtil.instance(CommonUtil.methodName()) spark.catalog().dropTempView(table) } object SparkUtil { fun instance(name: String? = ""): SparkSession { return make(name!!) } private fun make(name: String): SparkSession { return config( SparkSession.builder().appName(name) ).enableHiveSupport().orCreate } private fun config(builder: SparkSession.Builder): Spark..
You need to iterate over steps.items(), because an iteration over dict only returns its keys. >>> x = sorted(steps.items()) >>> x [(1, 'value1'), (2, 'value3'), (5, 'value2')] Iterate over sorted keys: >>> for key in sorted(steps): ... # use steps[keys] to get the value https://stackoverflow.com/questions/16710112/python-iterate-over-dictionary-sorted-by-key python: iterate over dictionary sorte..
https://www.youtube.com/watch?v=RBDoN0ehZXE

https://qkqhxla1.tistory.com/1136 parquet vs orc vs avro (big data file format ) 1. www.datanami.com/2018/05/16/big-data-file-formats-demystified/ 공통점. 3개 타입은 전부 하둡에 저장하는데에 최적화되어있다. orc, parquet, avro 3개 전부 기계가 읽을수 있는 바이너리 포맷이다. orc, p.. qkqhxla1.tistory.com https://www.quora.com/Why-is-parquet-best-for-Spark-and-not-ORC-although-both-are-columnar-based-file-formats Why is parquet best for Spark..
# emr.sh #!/bin/sh TAG=$1 ENV=$2 CLASS=$3 ARGS=$4 SRC=s3://src/${ENV}/jar/batch/batch.jar LOG=s3://log/${ENV}/batch/ SUBNET_ID=subnet-0e3653577617c98a3 echo $( \ aws emr create-cluster \ \ --auto-scaling-role EMR_AutoScaling_DefaultRole \ --instance-groups file://./batch/static/json/instance.json \ \ --name ${CLASS} \ --release-label emr-6.7.0 \ --auto-terminate \ --applications Name=Spark \ --u..
ImportError: cannot import name 'json' from 'itsdangerous' (/Users/seunggab.kim/seunggabi/workspace/ads/ads-bot/venv/lib/python3.10/site-packages/itsdangerous/__init__.py) https://velog.io/@___pepper/Flask-ImportError-cannot-import-name-json-from-itsdangerous [Flask] ImportError: cannot import name 'json' from 'itsdangerous' itsdangerous import error in flask velog.io ImportError: cannot import ..
Example private fun token(email: String, password: String): String { val url = "https://asdf.com/tokens" val headers = mapOf( "Accept" to "application/json", "Content-Type" to "application/json", "Authorization" to "null" ) val json = mapOf( "auth_type" to "CREDENTIAL", "credential_type_payload" to mapOf( "email" to email, "password" to password, ), ).toJson() return CrawlUtil.post(url, headers,..
pipeline { agent { kubernetes { inheritFrom 'seunggabi-batch' defaultContainer 'seunggabi-batch' } } environment { COUNTRY = "kr" ENV = "prod" CLASS = "seunggabi.batch.job.TestJob" } stages { stage('Run Job') { steps { script { ARGS = sorted(params).collect { /$it.value/ } join "," } sh "/app/static/sh/emr.sh 1 20 ${COUNTRY} ${ENV} ${CLASS} \$(printenv MAIL_DOMAIN),\$(printenv MAIL_ID),\$(printe..

pipeline { agent { kubernetes { inheritFrom 'seunggabi-batch' defaultContainer 'seunggabi-batch' } } environment { COUNTRY = "kr" ENV = "prod" CLASS = "seunggabi.batch.job.SparkSubmitJob" } stages { stage('Run Job') { steps { script { ARGS = sorted(params).collect { /$it.value/ } join "," } sh "/app/static/sh/emr.sh 1 20 ${COUNTRY} ${ENV} ${CLASS} \"${ARGS}\"" } } } } @NonCPS def sorted(def m){ ..
https://docs.docker.com/network/bridge/ Use bridge networks docs.docker.com https://docs.docker.com/network/host/ Use host networking docs.docker.com FeatureBridgeHost Driver The Bridge network is provided by the Bridge driver The host network is provided by the host driver. Default bridge is the default network and provided by a bridge driver Host does not default. Connectivity The bridge drive..
https://alex-blog.tistory.com/entry/Spark-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-RDD-DataFrame Spark 프로그래밍 - RDD, DataFrame Spark는 Mapreduce의 대체자 MapReduce의 경우 Disk에서 매번 데이터를 처음부터 읽어야한다. (-> RDD는 데이터를 처음부터 읽을 필요가 없게 만들어준다.) Spark는 데이터를 메모리에 올려서 연산 방식 데 alex-blog.tistory.com
1. 스파크(SPARK)의 연산 방식은 lazy evaluation으로 수행된다. Lazy evaluation(굳이 번역해 보자면 느긋한 연산 정도 되겠다)을 사용함으로써 action이 시작되는 시점에 트랜스포메이션(transformation)끼리의 연계를 파악해 실행 계획의 최적화가 가능해진다. 사용자가 입력한 변환 연산들을 즉시 수행하지 않고 모아뒀다가 가장 최적의 수행 방법을 찾아 처리하는 장점을 가진다. 여기서 말하는 최적화란 대부분 지역성(locality)에 관한 것이다. 예를 들어 물건을 사오는 심부름을 시킬 때 A상점에서 파는 물건과 B상점에서 파는 물건을 따로따로 여러 번사오게 하는 것보다 필요한 물건을 한꺼번에 주문해서 한 번 방문했을 때 필요한 물건을 한 번에 사는 것이 효율적이기 떄문..
class Solution { public int maxProfit(int[] prices) { int buy = Integer.MIN_VALUE; int cooldown = 0; int sell = 0; for (int p : prices) { buy = Math.max(buy, cooldown - p); cooldown = Math.max(cooldown, sell); sell = Math.max(sell, buy + p); } return sell; } } https://gonewbie.github.io/2020/02/26/daily-algorithm-best-time-to-buy-and-sell-stock/ daily-algorithm-best-time-to-buy-and-sell-stock · ..
- Total
- Today
- Yesterday
- 테슬라 크레딧 사용
- 테슬라 리퍼럴 코드
- 인스타그램
- 테슬라
- 테슬라 리퍼럴 코드 혜택
- 어떻게 능력을 보여줄 것인가?
- 개리마커스
- 테슬라 레퍼럴
- 메디파크 내과 전문의 의학박사 김영수
- wlw
- Bot
- 테슬라 추천
- 연애학개론
- 모델y
- 클루지
- 팔로워 수 세기
- 책그림
- 테슬라 레퍼럴 적용 확인
- 테슬라 리퍼럴 코드 생성
- COUNT
- 김달
- 테슬라 레퍼럴 코드 확인
- Kluge
- 할인
- 모델 Y 레퍼럴
- 레퍼럴
- 유투브
- follower
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |