개발일을 하면서 여러명이 같이 일을 하다보니, 소스 변경이 너무 많고, 왜 이런 수정사항이 생겼는지 관리조차 되지 않을때가 있다.

개인적인 프로젝트를 진행하더라도, 자기가 그날 그날 수정한 코드들이 왜 수정되었는지 관리가 필요할 경우 우리가 생각해볼수 있는것은 여러가지 있겠지만, 그중에서도 가장 편한 방법은 쓰기 쉬운 형상관리 툴을 사용하는 것이다.


그동안 SourceSafe,SVN,CVS,GIT,ClearCase등을 다 써봤지만, Perforce만큼빠르고 쓰기 쉬운 툴은 아직 못본것 같다.


그런던차에 Perforce 를 개인적인 프로젝트를 위해서 사용할수 있는 방법이 없는지 하고 해당 사이트를 들어가보니, 20명의 유저와 20개의 워크스페이스로 무제한으로 사용가능한 Free 버전이 있었다. 바로 다운 받아서 설치했다. 아~~쾌적하다...



1. 일단 perforce 설치를 위해서 perforce 사용자를 추가하자. 앞으로 perforce의 모든 로그, 기록, 명령들은 perforce라는 사용자에 의해서 관리된다.




2. 그리고 나서 Perforce 서버는 기본적으로 daemon이라는 것이 있어야 돌아간다. 설치하자.



3. 이제는 perforce 서버데몬(p4d)와 command line tool(p4)를 다운받고...

http://www.perforce.com/downloads/complete_list




4.실행권한 줘서 복사하자..




5.저장소와 로그디렉토리를 만들고..(저장소에 모든 소스들이 저장된다)


 

6. 이젠 뭐 사용자들이 p4 잘쓸수 있게 profile에 추가해주고..(친절하니까...) 저기 보면 P4PORT가 있는데 나중에 IP가 바뀌면 저거도 같이 바꿔줘야 한다..





7. perforce를 init script에 포함시켜서 부팅시마다 알아서 시작되게 해두자..(역시 저기에 나오는 P4PORT값은 나중에 IP가 바뀌면 !!! 꼭!!!!! 바꿔줘야 p4d가 뜬다)




8. 실행해보면~~~




이제 형상관리 서버를 만들었으니,  cocos2dx를 안드로이드로 포팅하는 작업에 형상관리를 시작해야 겠다.

끝~

블로그 이미지

커뉴

이 세상에서 꿈 이상으로 확실한 것을, 인간은 가지고 있는 것일까?

,

안드로이드 어플을 개발하다보면, DataBase를 사용해야 하는 경우가 간혹있다. 우리가 많이 사용하는 전화번호부, 일정관리 어플, 메시지 프로그램들이 모두가 DB를 자체적으로 사용하고 있는 것들이다.


안드로이드는 프레임웍에서 SQLite를 사용하기 쉽게 제공하고 있다. 그래서 오늘은 정말 정말 정말, 간단한 진짜 아무런 기능이 아직 준비되어 있지 않은 기본적인 Provider의 기본중의 기본 클래스만 만들어서 공유하고자 한다. 이후 DB를 사용하거나, openFile(API 9 GingerBread 부터 지원)과 같은 API를 사용해서 기능을 붙여나가고 진짜 DB를 써야 할 이유가 있을때 적절한 설명과 예제를 공유하도록 하겠지만, 오늘은 정말 기 기초적인 Provider의 껍데기만을 만들어뒀다.


나중에 필요할일이 생기면 그대로 복사해서 필요한 것들 추가하고 바로 사용할수 있게함이 목적이다.


Provider를 만들기 위해서는 AndroidManifest.xml에 provider를 선언해줘야 한다, ContentProvider는 내부적으로 Binder Interface를 통해서 IPC를 지원하고 있다.그래서 Manifest File에 내가 제공하는 provider정보를 명세해주어야지 다른 어플에서도 내가 제공하는 Provider의 Authority로 DB를 접근할수 있게 할수있다.


1. AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.hoepisagoodthing.simpleprovider"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15" />

    <application android:label="@string/app_name"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/AppTheme">
        
        <provider
            android:authorities="com.hopeisagoodthing.simpleprovider"
            android:enabled="true"
            android:exported="true"            
            android:label="Coolkim"
            android:name="com.hopeisagoodthing.simpleprovider.Provider"
            android:syncable="false" >
        </provider>

    </application>

</manifest>




2. Provider와 DataBaseHelper Class

package com.hopeisagoodthing.simpleprovider;

import java.io.File;
import java.io.FileNotFoundException;

import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import android.util.SparseArray;

public class Provider extends ContentProvider{
	private static final String TAG="Provider";
	private static final String authority = "com.hopeisagoodthing.simpleprovider";
	private SQLiteOpenHelper dbHelper;
	private SQLiteDatabase db;
	private UriMatcher uriMatcher;
	
	private interface Scheme{
		interface Table{
			static final String NAME="name";
			static final String ADDR="address";
			static final String INTEREST="interest";
		}
		interface Match{
			static final int NAME=1;
			static final int ADDR=2;
			static final int INTEREST=3;
		}		
	}	
	
	private static final SparseArray<Stringgt; tableMap = new SparseArraylt;Stringgt;();
	static{
		tableMap.put(Scheme.Match.NAME, Scheme.Table.NAME);
		tableMap.put(Scheme.Match.ADDR, Scheme.Table.ADDR);
		tableMap.put(Scheme.Match.INTEREST, Scheme.Table.INTEREST);		
	}

	@Override
	public int delete(Uri uri, String selection, String[] selectionArgs) {
		int 	match 	= uriMatcher.match(uri);
		switch(match){
		case Scheme.Match.NAME:
			break;
		
		case Scheme.Match.ADDR:
			break;
			
		case Scheme.Match.INTEREST:
			break;
			
		default:
			throw new UnsupportedOperationException();			
		}
		
		return db.delete(tableMap.get(match), selection, selectionArgs);		
	}

	@Override
	public String getType(Uri uri) {
		int 	match 	= uriMatcher.match(uri);
		switch(match){
		case Scheme.Match.NAME:
			break;
		
		case Scheme.Match.ADDR:
			break;
			
		case Scheme.Match.INTEREST:
			break;
			
		default:
			throw new UnsupportedOperationException();	
		}
		return null;
	}

	@Override
	public Uri insert(Uri uri, ContentValues values) {
		int 	match 	= uriMatcher.match(uri);
		switch(match){
		case Scheme.Match.NAME:
			break;
		
		case Scheme.Match.ADDR:
			break;
			
		case Scheme.Match.INTEREST:
			break;
			
		default:
			throw new UnsupportedOperationException();	
		}
		
		long rowId =  db.insert(tableMap.get(match), null, values);
		uri = ContentUris.withAppendedId(uri, rowId);
		getContext().getContentResolver().notifyChange(uri, null);
		return uri;
	}

	@Override
	public boolean onCreate() {
		dbHelper 	= new SimpleDatabaseHelper(getContext());
        db 		= dbHelper.getWritableDatabase();
        uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);

        uriMatcher.addURI(authority, Scheme.Table.NAME, Scheme.Match.NAME);       
        uriMatcher.addURI(authority, Scheme.Table.ADDR,Scheme.Match.ADDR); 
        uriMatcher.addURI(authority, Scheme.Table.INTEREST, Scheme.Match.INTEREST);
       
		return true;		
	}

	@Override
	public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
		int 	match 	= uriMatcher.match(uri);
		switch(match){
		case Scheme.Match.NAME:
			break;
		case Scheme.Match.ADDR:
			break;
		case Scheme.Match.INTEREST:
			break;
			
		default:
			throw new UnsupportedOperationException();	
		}
		
		return db.query(tableMap.get(match), projection, selection, selectionArgs, null, null, sortOrder);
		
	}

	@Override
	public int update(Uri uri, ContentValues values, String selection,
			String[] selectionArgs) {
		int 	match 	= uriMatcher.match(uri);
		switch(match){
		
		case Scheme.Match.NAME:
			break;
		
		case Scheme.Match.ADDR:
			break;
		
		case Scheme.Match.INTEREST:
			break;
			
		default:
			throw new UnsupportedOperationException();	
		}
		
		
		return db.update(tableMap.get(match), values, selection,selectionArgs);
	}
	
	@Override
	public ParcelFileDescriptor openFile (Uri uri,String mode){
		ParcelFileDescriptor fd = null;
		
		String filename = uri.getQueryParameter("filename");
		if(filename == null || filename.isEmpty()){
			throw new UnsupportedOperationException();
		}
		File dir = getContext().getFilesDir();
		if(dir.exists() == false){
			dir.mkdir();
		}
		String filepath = dir.getAbsolutePath()+ "/" +filename;
	    try {
			fd = ParcelFileDescriptor.open(new File(filepath), ParcelFileDescriptor.MODE_CREATE|ParcelFileDescriptor.MODE_READ_WRITE);
		} catch (FileNotFoundException e) {
			Log.e(TAG,"Unable to open file "+ filepath);
		}		
		return fd;		
	}
	
	@Override
	public int bulkInsert(Uri uri, ContentValues[] values) {
		long 	rowId 		= -1;
		int 	count = 0;
		int 	match 	= uriMatcher.match(uri);
			
		db.beginTransaction();
					
		switch(match){
		
		case Scheme.Match.NAME:
			break;
		
		case Scheme.Match.ADDR:
			break;
		
		case Scheme.Match.INTEREST:
			break;
		
		default:
			throw new UnsupportedOperationException();	
		}
		
		for(ContentValues value:values){
			rowId = db.insert(tableMap.get(match), null, value);
			if(rowId > 0 ){
				count++;
			}
		}
		
		db.setTransactionSuccessful();			
		
		db.endTransaction();
		uri = ContentUris.withAppendedId(uri, rowId);
		getContext().getContentResolver().notifyChange(uri, null);
		return count;
	}
	
	private class SimpleDatabaseHelper extends SQLiteOpenHelper {	
		private static final String DATABASE_NAME = "simple.db";
		private static final int DATABASE_VERSION = 1;
		private static final String NAME_TABLE_CREATE = "CREATE TABLE "
				+ "name" + " (" 
				+ "_id" + " INTEGER PRIMARY KEY AUTOINCREMENT," 
				+ "name" + " TEXT "+");";
		
		private static final String ADDRESS_TABLE_CREATE = "CREATE TABLE "
				+ "address" + " (" 
				+ "_id" + " INTEGER PRIMARY KEY AUTOINCREMENT," 
				+ "address" + " TEXT ," 
				+ "name_id" + " INTEGER " + ");";
		
		private static final String INTEREST_TABLE_CREATE = "CREATE TABLE "
				+ "interest" + " (" 
				+ "_id" + " INTEGER PRIMARY KEY AUTOINCREMENT,"				
				+ "interest" + " TEXT ," 
				+ "name_id" + " INTEGER " + ");";
		
		protected SimpleDatabaseHelper(Context context) {
			super(context, DATABASE_NAME, null, DATABASE_VERSION);
		}

		@Override
		public void onCreate(SQLiteDatabase db) {
			try {				
				db.execSQL(NAME_TABLE_CREATE);	
				db.execSQL(ADDRESS_TABLE_CREATE);
				db.execSQL(INTEREST_TABLE_CREATE);
			} catch (Exception e) {
				Log.e(TAG, "onCreate: Exception - " + e.getMessage());
			}
		}

		@Override
		public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		}
	}
}

블로그 이미지

커뉴

이 세상에서 꿈 이상으로 확실한 것을, 인간은 가지고 있는 것일까?

,

iOS용 게임을 개발할때 coco2d를 사용했었는데, 잠깐 한들여다본 사이에 cocos2d-x라는 것이 나와서 모든 플래폼에서 게임을 개발할수 있게 아예 cpp로 소스를 전부다 만들어놓은것이 나와있었다.


iOS용은 Objective-C로 되어 있었기 때문에 그냥 빌드할때 프로젝트만 추가해서 빌드하면되었는데, 윈도우에서 Android용 게임을 한번 개발해볼까 하고 cocos2d를 설치할려고 하니 개발환경 설치도 ... 하나의 일이된것 같다. 그래서 정리해둔다...


준비물(정말 아래대로 준비해둬야 한다.) - eclipse,JDK, Android SDK는 설치되어 있다는 가정하에 ..

1. Cygwin(Windows 환경하에서 Linux Build환경을 사용하기 위해서 설치필요)

 -  http://cygwin.com/install.html에서 Setup.exe를 다운받고 실행시키면 된다. 설치 패키지중 Devel,Editor 패키지정도는 install로 바꿔서 설치




2. Customized Android NDK (Native Development Kit)(기본 NDK가 아닌 stl을 지원하는 Crystax의 NDK를 반드시 설치해야 한다.) 

 - http://www.crystax.net/ko/android/ndk/7#download

 - 최신 버전으로 다운받고 압축 풀어두면 됨(이걸 모르고 기본 NDK로 cocos2d-x  빌드하려고 무려 3시간을 낭비 했다 ㅠ.ㅠ)

 - 그리고 빌드중 계속 stl , std:: link에러가 나오면 반드시 prog.android\jni\Application.mk 파일을 열어서 아래와 같이 수정해줘야 한다.

    APP_STL := gnustl_static  -->  APP_STL := stlport_static


3. cocos2d-x  다운로드후 압축 풀기 

 - http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download


압축을 다 해제하고, 설치를 끝낸 후 디렉토리의 모습







준비는 이제 다 끝났으니, 본격적으로 cocos2d를 사용하기 위해서는 환경설정도 맞춰줘야 되고, cygwin 설정 그리고 project설정을 맞춰줘야 한다.해보자

1. windows에 path 추가

 - 환경변수 설정에서 path에 다음두개를 추가해두기.

 -  D:\Android\android-sdks\tools;D:\cygwin\usr\include


2. cygwin terminal을 열어서 .bashrc 수정

 export PATH=$PATH:/cygdrive/d/Android/android-ndk-r7-crystax-5

 export ANDROID_NDK_ROOT=/cygdrive/d/Android/android-ndk-r7-crystax-5

 export NDK_ROOT=/cygdrive/d/Android/android-ndk-r7-crystax-5   --> 이건 프로젝트 생성하면 설정되지만, 그냥 추가해둠.


3. 수정된 .bashrc 반영

 source ~/.bashrc


4. cocos2d-x 프로젝트 설정 수정

D:\Android\cocos2dx\cocos2d-2.0-x-2.0.4\create-android-project.bat 파일이 안드로이드용 프로젝트를 생성해주는 스크립트(열어서 환경설정변경)

:: modify it to work under your environment  

set _CYGBIN=D:\cygwin\bin

if not exist "%_CYGBIN%" echo Couldn't find Cygwin at "%_CYGBIN%" & pause & exit 4


:: modify it to work under your environment

set _ANDROIDTOOLS=D:\Android\android-sdks\tools

if not exist "%_ANDROIDTOOLS%" echo Couldn't find android sdk tools at "%_ANDROIDTOOLS%" & pause & exit 5


:: modify it to work under your environment

set _NDKROOT=D:\Android\android-ndk-r7-crystax-5


5. Windows cmd 열어서 cocos2d-x 용 안드로이드 프로젝트 생성.

D:\Android\cocos2dx\cocos2d-2.0-x-2.0.4\create-android-project.bat을 실행하면 됨.

자신이 추가해둔 sdk 에 따라서 생성할수 프로젝트 들이 나오는데 그중에 하나를 선택하면 됨 예를 들면 아래 처럼하면 됨



6. cygwin에서 shared library 빌드하기.

자신이 생성한 프로젝트 디렉토리로 가서 build 하기(helloworld로 프로젝트를 만들었다면 아래와 같이 하면 됨)




7. eclipse 에서 작업하기
eclipse에서 위에서 생성한 helloworld 프로젝트를 열면 됨.
에러가 나는 경우는 Java Compiler 가 맞지 않을 경우와 cocos2d-x 라이브러리가 없을때인데 아래와 같이 해결하면 된다.

Java Compiler는 1.6으로 맞춰주고 ....



cocos2d Library가 없다고 에러가 나면.... 아래 lib 폴더를 복사해서 아래 eclipse의 패키지처럼되게 넣으면 된다.






실행해보면~~~~~ 이렇게 나온다. 이제 준비끝.... 아흑,.. 삽질을 좀 했다.



iOS게임으로 만들었던 BlueOcean을 Android에 그대로 포팅해봐야 겠다.

'코딩하고 > C,C++' 카테고리의 다른 글

큰 정수 계산하기  (0) 2016.03.27
OS - Page Fault Simulation(FIFO,LRU,Optimal)  (0) 2012.10.21
자료구조 - 계산기 만들기  (10) 2012.10.12
C언어로 만든 객체  (0) 2012.10.11
자료구조 - 다항식 연산하기  (2) 2012.10.10
블로그 이미지

커뉴

이 세상에서 꿈 이상으로 확실한 것을, 인간은 가지고 있는 것일까?

,

Boyz II Men 


It's so hard to say goodbye to yesterday.


위대한 탄생의 마샬 방(??) 이 처음 부른 노래인데 하도 오래전에 들었던 노래라서 무슨 노래인가 하고 다시 찾아서 들은 노래


아카펠라로는 단연 최고.




블로그 이미지

커뉴

이 세상에서 꿈 이상으로 확실한 것을, 인간은 가지고 있는 것일까?

,

한 10년전쯤인가, 그때는 PHP + MySQL등등으로 RDB전성시대였었던것 같은데(물론 지금은 어떤지 알수 없다..) 최근에는 여기 저기서 NoSQL DB를 많이 사용하고 있는것 같다. 대용량 데이터를 처리하고 다뤄야 하는 데이터 싱크 용도로는 Cassandra 같은 분산 DB가 단연 최고이다.


오늘은 그래서 Cassandra를 한번 설치해봤다. Cassandra가 뭐고, 어떻게 동작하는 것인지는 설치부터 해놓고 이것 저것 만들어가면서 설명해도 모지라지 않으니 일단은 설치부터 해보자.




설치 및 실행 방법


1. 설치하는 방법

1. 다운로드 받기 (http://cassandra.apache.org/download/)

cassandra@ubuntu:~$ wget http://apache.mirror.cdnetworks.com/cassandra/1.1.6/apache-cassandra-1.1.6-bin.tar.gz


2. 압축풀기

cassandra@ubuntu:~$ tar xvfz apache-cassandra-1.1.6-bin.tar.gz

cassandra@ubuntu:~$ mkdir bin

cassandra@ubuntu:~$ mv apache-cassandra-1.1.6 ./bin

cassandra@ubuntu:~$ cd bin

cassandra@ubuntu:~/bin$ ln -s apache-cassandra-1.1.6 cassandra


3. 로그 설정이라던지, 각종 설정 변경하기는 아래 두개의 파일을 수정하면 됨.

cassandra@ubuntu:~/bin$ cd cassandra

cassandra@ubuntu:~/bin/cassandra$ cd conf

cassandra.yaml --> 기본적인 설정들

log4j-server.properties --> 로그 설정들.


2. 실행하는 방법 

cassandra@ubuntu:~$ bin/cassandra/bin/cassandra

xss =  -ea -javaagent:bin/cassandra/bin/../lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms753M -Xmx753M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss180k

 INFO 07:44:21,693 Logging initialized

 INFO 07:44:21,697 JVM vendor/version: Java HotSpot(TM) Client VM/1.6.0_37

 INFO 07:44:21,697 Heap size: 779091968/780140544

 INFO 07:44:21,698 Classpath: bin/cassandra/bin/../conf:bin/cassandra/bin/../build/classes/main:bin/cassandra/bin/../build/classes/thrift:bin/cassandra/bin/../lib/antlr-3.2.jar:bin/cassandra/bin/../lib/apache-cassandra-1.1.6.jar:bin/cassandra/bin/../lib/apache-cassandra-clientutil-1.1.6.jar:bin/cassandra/bin/../lib/apache-cassandra-thrift-1.1.6.jar:bin/cassandra/bin/../lib/avro-1.4.0-fixes.jar:bin/cassandra/bin/../lib/avro-1.4.0-sources-fixes.jar:bin/cassandra/bin/../lib/commons-cli-1.1.jar:bin/cassandra/bin/../lib/commons-codec-1.2.jar:bin/cassandra/bin/../lib/commons-lang-2.4.jar:bin/cassandra/bin/../lib/compress-lzf-0.8.4.jar:bin/cassandra/bin/../lib/concurrentlinkedhashmap-lru-1.3.jar:bin/cassandra/bin/../lib/guava-r08.jar:bin/cassandra/bin/../lib/high-scale-lib-1.1.2.jar:bin/cassandra/bin/../lib/jackson-core-asl-1.9.2.jar:bin/cassandra/bin/../lib/jackson-mapper-asl-1.9.2.jar:bin/cassandra/bin/../lib/jamm-0.2.5.jar:bin/cassandra/bin/../lib/jline-0.9.94.jar:bin/cassandra/bin/../lib/json-simple-1.1.jar:bin/cassandra/bin/../lib/libthrift-0.7.0.jar:bin/cassandra/bin/../lib/log4j-1.2.16.jar:bin/cassandra/bin/../lib/metrics-core-2.0.3.jar:bin/cassandra/bin/../lib/servlet-api-2.5-20081211.jar:bin/cassandra/bin/../lib/slf4j-api-1.6.1.jar:bin/cassandra/bin/../lib/slf4j-log4j12-1.6.1.jar:bin/cassandra/bin/../lib/snakeyaml-1.6.jar:bin/cassandra/bin/../lib/snappy-java-1.0.4.1.jar:bin/cassandra/bin/../lib/snaptree-0.1.jar:bin/cassandra/bin/../lib/jamm-0.2.5.jar

 INFO 07:44:21,699 JNA not found. Native methods will be disabled.

 INFO 07:44:21,710 Loading settings from file:/home/cassandra/bin/apache-cassandra-1.1.6/conf/cassandra.yaml

 INFO 07:44:21,826 32bit JVM detected.  It is recommended to run Cassandra on a 64bit JVM for better performance.

 INFO 07:44:21,826 DiskAccessMode 'auto' determined to be standard, indexAccessMode is standard

 INFO 07:44:22,008 Global memtable threshold is enabled at 248MB

 INFO 07:44:22,239 Initializing key cache with capacity of 37 MBs.

 INFO 07:44:22,249 Scheduling key cache save to each 14400 seconds (going to save all keys).

 INFO 07:44:22,253 Initializing row cache with capacity of 0 MBs and provider org.apache.cassandra.cache.SerializingCacheProvider

 INFO 07:44:22,258 Scheduling row cache save to each 0 seconds (going to save all keys).

 INFO 07:44:22,353 Opening /home/cassandra/data/system/Versions/system-Versions-hf-1 (247 bytes)

 INFO 07:44:22,379 Opening /home/cassandra/data/system/LocationInfo/system-LocationInfo-hf-6 (346 bytes)

 INFO 07:44:22,385 Opening /home/cassandra/data/system/LocationInfo/system-LocationInfo-hf-5 (163 bytes)

 INFO 07:44:22,445 Couldn't detect any schema definitions in local storage.

 INFO 07:44:22,446 Found table data in data directories. Consider using the CLI to define your schema.

 INFO 07:44:22,467 completed pre-loading (2 keys) key cache.

 INFO 07:44:22,596 Replaying /home/cassandra/commitlog/CommitLog-1353080634664.log, /home/cassandra/commitlog/CommitLog-1353080634663.log

 INFO 07:44:22,606 Replaying /home/cassandra/commitlog/CommitLog-1353080634664.log

 INFO 07:44:22,615 Finished reading /home/cassandra/commitlog/CommitLog-1353080634664.log

 INFO 07:44:22,616 Replaying /home/cassandra/commitlog/CommitLog-1353080634663.log

 INFO 07:44:22,655 Finished reading /home/cassandra/commitlog/CommitLog-1353080634663.log

 INFO 07:44:22,687 Enqueuing flush of Memtable-Versions@19288329(83/103 serialized/live bytes, 3 ops)

 INFO 07:44:22,692 Writing Memtable-Versions@19288329(83/103 serialized/live bytes, 3 ops)

 INFO 07:44:22,742 Completed flushing /home/cassandra/data/system/Versions/system-Versions-hf-2-Data.db (247 bytes) for commitlog position ReplayPosition(segmentId=1353080662588, position=0)

 INFO 07:44:22,750 Log replay complete, 3 replayed mutations

 INFO 07:44:22,777 Cassandra version: 1.1.6

 INFO 07:44:22,777 Thrift API version: 19.32.0

 INFO 07:44:22,780 CQL supported versions: 2.0.0,3.0.0-beta1 (default: 2.0.0)

 INFO 07:44:22,846 Loading persisted ring state

 INFO 07:44:22,849 Starting up server gossip

 INFO 07:44:22,856 Enqueuing flush of Memtable-LocationInfo@29499086(29/36 serialized/live bytes, 1 ops)

 INFO 07:44:22,859 Writing Memtable-LocationInfo@29499086(29/36 serialized/live bytes, 1 ops)

 INFO 07:44:22,871 Completed flushing /home/cassandra/data/system/LocationInfo/system-LocationInfo-hf-7-Data.db (80 bytes) for commitlog position ReplayPosition(segmentId=1353080662588, position=363)

 INFO 07:44:22,892 Starting Messaging Service on port 7000

 INFO 07:44:22,904 Using saved token 77712367279614969246272394525491308416

 INFO 07:44:22,911 Enqueuing flush of Memtable-LocationInfo@12254719(53/66 serialized/live bytes, 2 ops)

 INFO 07:44:22,917 Writing Memtable-LocationInfo@12254719(53/66 serialized/live bytes, 2 ops)

 INFO 07:44:22,944 Completed flushing /home/cassandra/data/system/LocationInfo/system-LocationInfo-hf-8-Data.db (163 bytes) for commitlog position ReplayPosition(segmentId=1353080662588, position=544)

 INFO 07:44:22,959 Node master/192.168.0.20 state jump to normal

 INFO 07:44:22,960 Bootstrap/Replace/Move completed! Now serving reads.


3.끝내는 방법

cassandra@ubuntu:~$ pkill -f 'java.*cassandra'

쉽다 너무..@.@


다음번에는 Cassandra의 Key,Column,Value에 대해서 설명하고 사용하는 것에 대해서 이야기하겠습니다.


블로그 이미지

커뉴

이 세상에서 꿈 이상으로 확실한 것을, 인간은 가지고 있는 것일까?

,