hadoop의 위치를 /a/b/c라고 하고 DataFrame에서 partitionBy를 다음처럼 사용한다면,
.write.mode(SaveMode.Append).partitionBy("command", "subcommand").orc(hourPath)
hadoop의 디렉토리 구조가 된다.
/a/b/c/command=add/action=abc
'scala' 카테고리의 다른 글
| [scala] null var 사용할 때 타입 사용하기 (0) | 2017.03.16 |
|---|---|
| [spark] dataframe 예제 (0) | 2017.03.15 |
| [spark] dataframe의 partitionby 사용시 hadoop 디렉토리 구조 (0) | 2017.03.15 |
| [spark] kafka stream을 append처리 (0) | 2017.03.15 |
| [spark] 집합 함수 - union, intersection, cartesian, subtract, join, cogroup 예제 (0) | 2017.03.15 |
| [spark] sbt 빌드시 - not found: org.jboss.interceptor#jboss-interceptor-api;1.1 에러 해결 (0) | 2017.03.15 |



댓글을 달아 주세요