Spark Streaming Job(Kafka-Consumer)의 성능을 높일 수 있다.


* Kafka topic의 파티션 개수 * 설정 파일의 spark.streaming.kafka.maxRatePerPartition 이다.


* 파티션 개수가 10개 * spark.streaming.kafka.maxRatePerPartition이 5 개이면 => 50 event /duration 성능이 나온다.


그러나 maxRatePerPartition이 너무 크면 OOM이 발생하거나 스트리밍 시스템(sink)에 영향을 줄 수 있다.




스트리밍이 제대로 동작되는지 확인하려면 2가지를 확인할 수 있다.


1) 52 completed batches, 653 records (동작안되면 0 completed batches 라고 뜬다)


2) Processing Time과 Total Delay 처리 Avg 시간을 확인한다. -로 나온다면 처리하는 것이 아니다. 




Posted by '김용환'
,

td-agent 모니터링

Tool 2019. 10. 28. 18:29


td-agent가 잘동작하는지 확인하려면 시스템 레벨에서 td-agent가 잘 동작하는지를 확인할 수 있을 것이다.


이외 td-agent에 기본적으로 설치된 24220 포트를 활성화하고 해당 서버의 포트를 체크한다.

<source>
@type monitor_agent
bind 0.0.0.0
port 24220
</source>




대략 (파이썬을 사용해 ) ansible의 host 파일을 읽어 아래와 같이 모니터링할 수 있다. 

failed_servers = []

for ansible_server in ansible_server_list:

url = f"http://{ansible_server}:24220/api/plugins.json"

try:

r = requests.get(url)

r.raise_for_status()

except (requests.exceptions.ConnectionError, requests.exceptions.Timeout, requests.exceptions.HTTPError):

failed_servers.append(ansible_server)



Posted by '김용환'
,

sbt 동작 이상

scala 2019. 10. 21. 15:21


아무리 수정해도 sbt가 잘 동작하지 않으면, sbt의 로컬 디렉토리인  ~/.sbt 을 다시 지우고 시작하자!!


Posted by '김용환'
,


sbt 사용할 때 Exception이 fully하게 보여주지 않으니 답답한데..

-oD를 사용하니  기니 Exception이 fully 로 나온다. 속이 시원하다.


http://www.scalatest.org/user_guide/using_scalatest_with_sbt

Specifying ScalaTest Arguments

You can pass arguments to ScalaTest by using testOptions and Tests.Argument in your sbt build file:

testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oD")

The -oD argument above will be pass to ScalaTest for all test runs, you can also pass arguments for individual runs by using test-only and placing them after --, like this:

> test-only org.acme.RedSuite -- -oD


Posted by '김용환'
,


sbt 에서 컴파일 속도가 나지 않는다고 계속 아래 커맨드를 사용하라고 로그가 나와서 

[warn] Getting the hostname Alvins-MacBook-Pro.local was slow (5003.850955 ms).
This is likely because the computer's hostname is not set.
You can set the hostname with the command:
  scutil --set HostName $(scutil --get LocalHostName).

아래 커맨드를 사용하니 잘 동작한다. 

$ scutil —set HostName $(scutil —get LocalHostName)




참고할 내용


실제 코드 

https://github.com/sbt/sbt/pull/3766/files


질문 & 답

https://apple.stackexchange.com/questions/175320/why-is-my-hostname-resolution-taking-so-long


\

Posted by '김용환'
,

kudu 공부 링크

scribbling 2019. 10. 21. 15:16



kudu 번역

https://blog.cloudera.com/apache-kudu-read-write-paths/


https://blog.cloudera.com/?s=kudu


spark을 이용하면 read, write, update가 가능하다.. 


Posted by '김용환'
,


Open JDK를 테스트하는데 일주일 걸리고, 한 번 테스트하는데 만불(1200만원) 걸린다고 한다.


=> 역시 구글은 테스트를 중요하게 생각한다.


Posted by '김용환'
,




http://www.mysqlkorea.com/gnuboard4/bbs/board.php?bo_table=develop_03&wr_id=73



semi-sync 에 자체적으로 timeout 이 있어 일정 횟수 실패하면, 자동으로 async 로 변경된다.



Posted by '김용환'
,


증분처리(update 포함) 가능한 DFS로 우버의 hoodie가 아파치 인큐베이터 프로젝트가 되었다.

https://eng.uber.com/hoodie/

https://github.com/apache/incubator-hudi

https://hudi.apache.org/concepts.html



실제 기존 소스를 보기 위해 https://github.com/uber/hudi 에 접근하면  https://github.com/apache/incubator-hudi 로 리디렉션된다.



데이터브릭스는 이와 비슷한 오픈소스가 있다.. 현재 0.4이다. 


https://databricks.com/product/databricks-delta

https://docs.delta.io/0.4.0/quick-start.html

https://github.com/delta-io/delta

https://delta.io/news/delta-lake-0-4-0-released/



둘 다 DFS에 update, 증분처리, timeline 기능을 갖고 있다.


Posted by '김용환'
,


아마존에서 2019.10월 11일 회사 관련 주요 이슈에 대한 입장을 발표했다.

얼굴인식 기술 오용 가능성, 규제 필요성 주장,가품 판매자에 대한 조치 현황, 기후변화 대응, 직장 내 다양성 등에 대한 입장문을 발표했다.

https://www.aboutamazon.com/our-company/our-positions


https://www.cnbc.com/2019/10/11/amazon-posts-blog-on-big-topics-like-regulation-and-counterfeits.html

Posted by '김용환'
,