This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String json = ReadUrl.readUrl("https://nid.naver.com/oauth2.0/token?client_id=YOURCLIENTID&client_secret=YOURCLIENTSECRET&grant_type=authorization_code&state=YOURSTATETOKEN&code=AUTHORIZATIONCODE"); | |
| JSONObject jsonObj = null; | |
| jsonObj = (JSONObject) JSONValue.parse(json); | |
| AccessToken accessToken = new AccessToken(jsonObj.get("access_token").toString(), jsonObj.get("refresh_token").toString(), jsonObj.get("token_type").toString(), jsonObj.get("expires_in").toString()); | |
| HttpTransport transport = new NetHttpTransport(); | |
| //google-oauth-java-client | |
| Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken.getAccessToken()); | |
| HttpRequestFactory requestFactory = transport.createRequestFactory(credential); | |
| httpResponse = requestFactory.buildGetRequest(new GenericUrl("https://apis.naver.com/nidlogin/nid/getUserProfile.xml")).execute(); | |
| InputStream is = httpResponse.getContent(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //xml 파싱 | |
| DocumentBuilderFactory docbuildFact = DocumentBuilderFactory.newInstance(); | |
| DocumentBuilder docBuild = docbuildFact.newDocumentBuilder(); | |
| Document doc = docBuild.parse(is); | |
| doc.getDocumentElement().normalize(); | |
| //response | |
| NodeList responseNaver = doc.getElementsByTagName("response"); | |
| Node responseNode = responseNaver.item(0); | |
| Element responseElement = (Element) responseNode; | |
| //이메일 가져오기 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| webApp.setWar(warPath.getAbsolutePath()); | |
| File warTempDirectory = new File(conf.getString(ConfVars.ZEPPELIN_WAR_TEMPDIR)); | |
| warTempDirectory.mkdir(); | |
| LOG.info("ZeppelinServer Webapp path: {}", warTempDirectory.getPath()); | |
| webApp.setTempDirectory(warTempDirectory); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GEM_HOME=/usr/local/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo gem install -n /usr/local/bin GEM_NAME_HERE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| List<String> set = Lists.newArrayList(); | |
| for (int i = 0; i < 5; i++) { | |
| String a = new String("a"); | |
| String b = "a"; | |
| System.out.println(System.identityHashCode(a)); | |
| System.out.println(System.identityHashCode(b)); | |
| set.add("c"); | |
| System.out.println("?? =====> " + System.identityHashCode(set.get(0))); | |
| set.clear(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public int getProgress(InterpreterContext context) { | |
| open(); | |
| return intp.getProgress(context); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2016-08-02 11:34:31,836 ERROR [main] zookeeper.ZooKeeperWatcher: hconnection-0x6c302a1d0x0, quorum=localhost:2181, baseZNode=/hbase Received unexpected KeeperException, re-throwing exception | |
| org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid | |
| at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) | |
| at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) | |
| at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1102) | |
| at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:220) | |
| at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:416) | |
| at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65) | |
| at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:102) | |
| at org.apache.hadoop.hbase.client.ConnectionImplementation.retrieveClusterId(ConnectionImplementation.java:443) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [INFO] Zeppelin ........................................... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
OlderNewer