일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- pandas
- 쉘스크립트
- 명령어
- java
- MariaDB
- spring
- error
- cursorai
- mssql
- Linux
- github
- mysql
- analytics4
- DBMS
- oracle
- 오블완
- Kibana
- iBatis
- PostgreSQL
- docker
- 티스토리챌린지
- 자바
- 리눅스
- Javascript
- codeium
- git
- zset
- IntelliJ
- Python
- SQL
- Today
- Total
목록JAVA (54)
hanker
public static void zipDirectory(String dir, String zipfile) throws IOException, IllegalArgumentException{ //파일리스트 가져오기 위해 객체 생성 File d = new File(dir); //디렉토리 존재유무 if(!d.isDirectory()) throw new IllegalArgumentException("Not a directory : " + dir); //해당 경로의 파일을 배열로 가져옴 String[] entries = d.list(); //파일 복사를 위한 버퍼 byte[] buffer = new byte[4096]; int bytesRead; //zip파일을 생성하기 위한 객체 생성 ZipOutputStrea..
- ssh Keygen 등록되었다는 가정하에 소스 (기존 ssh 명령어를 통해 외부서버 접속 시 password 입력을 해야하지만 keygen 등록 시 패스워드 없이 서버 접속가능) (ssh keygen 등록 시) public static void main(String ar[]) throws Exception{ String execStr = "ssh 접속서버계정@서버IP Command"; // ex) "ssh test@1.1.1.1 rm -r /data/reData/text.txt"; Process ps = Runtime.getRuntime().exec(execStr); ps.getErrorStream(); ps.getInputStream(); ps.getOutputStream(); ps.waitFor(..
admin.disableTable("테이블 명"); admin.deleteTable("테이블 명");
void rename(Admin admin, String oldTableName, TableName newTableName) { String snapshotName = randomName(); admin.disableTable("기존 테이블 명"); admin.snapshot("TMP 테이블 명", "기존 테이블 명"); admin.cloneSnapshot("TMP 테이블 명", "변경 할 테이블 명"); admin.deleteSnapshot("TMP 테이블 명"); admin.deleteTable("기존 테이블 명"); } - rename 기능이 없기 때문에 파일명 변경 후 복제 → 원본 데이터 명 삭제 참고 : https://hbase.apache.org/book.html#table.rename