原创 flume之aysnhbase與java的結合
1.flume的sink爲aysnhbase的配置 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license a
原创 flume之多source配置
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE
原创 flume的freebsd系統的安裝
1.去http://flume.apache.org/網站下載相應的包apache-flume-1.7.0-bin.tar.gz 2.用ftp傳到相應的機上 然後解壓 在/root/.cshrc 裏面配置環境變量就可以了 3. 4
原创 flume值kafkachannel的使用
1.安裝flume 2.安裝kafka 3.測試kafka的topic是否能正常的傳遞消息 4.都準備好之後開始接通kafkachannel,現存一個疑問。之前使用過讓kafka純做channel。有source也有sink但是試驗不成功
原创 java上傳和下載
1.jsp頁面 <form id="subtaskForm" enctype="multipart/form-data" method="post" > <input type='file' id='file' nam
原创 flume使用中遇到的錯誤
1.Space for commit to queue couldn’t be acquired 原因:對於內存通道,當輸入過多,而無法全部輸出的時候,會導致內存通道崩潰,從而報錯。 解決辦法:設置agent1.channels.<c
原创 hive常見錯誤
1.查找hive的查詢報錯在hive的日誌中。找hive的日誌一般在hive的安裝目錄的conf中有個log的配置文件可以找到日誌的位置。一般默認爲/tmp/用戶名/hive.log 2.常見的錯誤 java.io.IOException
原创 java發送郵件帶附件和圖片
import org.apache.commons.httpclient.HttpConnection; import org.json.JSONObject; import org.springframework.stereotyp
原创 selenium+java截圖
*******************************************************windows環境*******************************************************
原创 phantomjs+java截圖
下載一個資源包 phantomjs-2.1.1-windows引入一下 import org.springframework.stereotype.Service; import java.io.BufferedReader; im
原创 java連接hive
maven依賴 <dependency> <groupId>org.apache.hive</groupId> <artifactId>hive-jdbc</artifactId> <version>2.0.0<
原创 java連接kylin
maven依賴 <dependency> <groupId>org.apache.kylin</groupId> <artifactId>kylin-jdbc</artifactId> <version>1.5.
原创 html轉圖片
JEditorPane editorPane=new JEditorPane(new URL(url)); editorPane.setSize(400,400); BufferedImage image=new Buffe
原创 java發送郵件
<dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> </dependency> <dependency> <gro
原创 java循環文件夾讀取各種文件
文件格式是這樣的 處理方法爲: package com.caissa.chador_mr; import org.apache.commons.compress.compressors.bzip2.BZip2CompressorIn