'2016/09'에 해당되는 글 7건

  1. 2016.09.30 [Git] 리모트 브랜치 목록 새로고침.
  2. 2016.09.30 [물때정보] 국립해양조사원에서 물때 정보 얻기.
  3. 2016.09.29 [HttpAsyncClient] example : AsyncClientHttpExchangeFutureCallback
  4. 2016.09.28 [HttpClient] Async Http Request Docs.
  5. 2016.09.26 [스크랩] Elasticsearch nightly benchmarks
  6. 2016.09.22 [알고리즘] Algorithm Visualizer
  7. 2016.09.19 [Tomcat] Spring framework 사용 시 중복 실행 이슈

[Git] 리모트 브랜치 목록 새로고침.

ITWeb/개발일반 2016. 9. 30. 18:06

ide를 사용하다 보면 git remote branch 목록 sync 가 안될 때가 있습니다.

그래서 수동으로 명령어 날려 주는데요.

혹시 몰라 그냥 기록해 봅니다.



$ git remote prune origin --dry-run


dry run 해보시고 최종 실행 시에는 빼고 돌리시면 됩니다.

:

[물때정보] 국립해양조사원에서 물때 정보 얻기.

Legacy 2016. 9. 30. 16:10

해루질이나 갯벌체험을 하기 위해서는 물때 정보가 꼭 필요 합니다.

아래 사이트 들어 가시면 물때 정보를 구하실 수 있습니다.


http://www.khoa.go.kr/

:

[HttpAsyncClient] example : AsyncClientHttpExchangeFutureCallback

ITWeb/개발일반 2016. 9. 29. 16:35

Concurrent Request 를 보낼 일이 있어서 샘플 코드 투척해 봅니다.

제가 작성한건 아니고 그냥 httpcomponents-asyncclient 에 있는 example 입니다.


Main Method)

public static void main(final String[] args) throws Exception {
RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(3000)
.setConnectTimeout(3000).build();
CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom()
.setDefaultRequestConfig(requestConfig)
.build();
try {
httpclient.start();
final HttpGet[] requests = new HttpGet[] {
new HttpGet("http://www.apache.org/"),
new HttpGet("https://www.verisign.com/"),
new HttpGet("http://www.google.com/")
};
final CountDownLatch latch = new CountDownLatch(requests.length);
for (final HttpGet request: requests) {
httpclient.execute(request, new FutureCallback<HttpResponse>() {

@Override
public void completed(final HttpResponse response) {
latch.countDown();
System.out.println(request.getRequestLine() + "->"
+ response.getStatusLine());
}

@Override
public void failed(final Exception ex) {
latch.countDown();
System.out.println(request.getRequestLine() + "->" + ex);
}

@Override
public void cancelled() {
latch.countDown();
System.out.println(request.getRequestLine() + " cancelled");
}

});
}
latch.await();
System.out.println("Shutting down");
} finally {
httpclient.close();
}
System.out.println("Done");
}


:

[HttpClient] Async Http Request Docs.

ITWeb/개발일반 2016. 9. 28. 10:23


async http client 기능 구현을 위해 문서 keep 합니다.


https://hc.apache.org/httpcomponents-asyncclient-dev/quickstart.html


https://github.com/AsyncHttpClient/async-http-client

:

[스크랩] Elasticsearch nightly benchmarks

Elastic/Elasticsearch 2016. 9. 26. 16:27

일단 Keep!


https://elasticsearch-benchmarks.elastic.co/index.html

:

[알고리즘] Algorithm Visualizer

ITWeb/스크랩 2016. 9. 22. 12:34

일단 keep.


https://github.com/parkjs814/AlgorithmVisualizer

:

[Tomcat] Spring framework 사용 시 중복 실행 이슈

ITWeb/개발일반 2016. 9. 19. 11:08

tomcat + spring 을 사용하면서 startup.sh 를 이용해서 실행 후 로그를 확인해 보면 두 번 실행(로딩) 되는 모습을 확인 할 때가 있습니다.


이렇게 두 번 실행이 될 경우 예상하지 못했던 문제를 가끔 경험 하게 되는데요.

아래와 같이 tomcat 의 server.xml 수정을 통해서 한 번만 실행 되도록 처리 할 수 있습니다.


기존 두 번 실행 되던 server.xml)

    <Engine name="Catalina" defaultHost="localhost">

      <Host name="localhost"  appBase="webapps"

            unpackWARs="false" autoDeploy="false">

        <Context docBase="web-service" path="/" reloadable="false" />

      </Host>

    </Engine>



수정된 server.xml)

    <Engine name="Catalina" defaultHost="localhost">

      <Host name="localhost"  appBase="webapps/web-service"

            unpackWARs="false" autoDeploy="false">

        <Context docBase="" path="/" reloadable="false" />

      </Host>

    </Engine>


그냥 별건 아니지만 scheduler 같은 컴포넌트를 사용하시는 경우 중복 실행이 될 수 있기 때문에 공유해 봅니다.

: