메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


import org.apache.spark.sql.SparkSession

object AccountsByState {
  def main(args: Array[String]) {
    if (args.length < 1) {
      System.err.println("Usage: stubs.AccountByState <state-code>")
      System.exit(1)
    }

    val stateCode = args(0)
    val spark = SparkSession.builder.getOrCreate()

    val accountsDF = spark.read.table("accounts")
    val stateAccountsDF = accountsDF.where(accountsDF("state") === stateCode)
    stateAccountsDF.write.mode("overwrite").save("/loudacre/accounts_by_state/"+stateCode)

    spark.stop

  }
}

번호 제목 날짜 조회 수
307 [Kerberos]병렬 kinit 호출시 cache파일이 손상되어 Bad format in credentials cache 혹은 No credentials cache found 혹은 Internal credentials cache error 오류 발생시 2023.01.20 4588
306 FAILED: IllegalStateException Variable substitution depth too large: 40 오류발생시 조치사항 2014.08.19 4588
305 [CDP7.1.7]EncryptionZone에 table생성및 권한 테스트 2023.09.26 4580
304 unique한 값 생성 2014.04.25 4580
303 [TLS]TLS용 사설 인증서 변경 혹은 신규 지정시 No trusted certificate found 오류 발생시 확인및 조치사항 2022.03.15 4578
302 hbase가 기동시키는 zookeeper에서 받아드리는 ip가 IPv6로 사용되는 경우가 있는데 이를 IPv4로 강제적용하는 방법 2015.05.08 4576
301 mongodb aggregation query를 Java code로 변환한 샘플 2016.12.15 4574
300 column family삭제시 Column family 'delete' does not exist오류 발생하는 경우 2014.04.14 4571
299 [2.7.2] distribute-exclude.sh사용할때 ssh 포트변경에 따른 오류발생시 조치사항 2018.01.02 4570
298 missing block및 관련 파일명 찾는 명령어 2021.02.20 4568
297 kudu table와 impala(hive) table정보가 틀어져서 테이블을 읽지 못하는 경우(Error Loading Metadata) 조치방법 2023.11.10 4567
296 [Cloudera 6.3.4, Kudu]]Service Monitor에서 사용하는 metric중에 일부를 blacklist로 설정하여 모니터링 정보 수집 제외하는 방법 2022.07.08 4563
295 "Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources"오류 발생시 조치사항 2016.05.25 4563
294 [DBeaver 4.3.0]import/export시 "Client home is not specified for connection" 오류발생시 조치사항 2017.12.21 4561
293 oozie가 말하는 start시간은..서버에서 확인되는 시간이 아닙니다. 2014.05.14 4559
292 HDFS 파일및 디렉토리 생성시 생성방법에 따라 권한이 다르게 부여된다. 2022.05.30 4552
291 [CDP7.1.6,HDFS]HDFS파일을 삭제하고 Trash비움이 완료된후에도 HDFS 공간을 차지하고 있는 경우 확인/조치 방법 2023.07.17 4551
290 update 샘플 2018.03.12 4546
289 avro 사용하기(avsc 스키마 파일 컴파일 방법, consumer, producer샘플소스) 2016.07.08 4543
288 [CDP7.1.7]Hive Replication수행시 Target Cluster에서 Specified catalog.database.table does not exist 오류 2024.05.08 4538
위로