Google Cloud CLI는 애플리케이션을 테스트하는 데 사용할 수 있는 Bigtable용 로컬 인메모리 에뮬레이터를 제공합니다. 에뮬레이터는 메모리에만 데이터를 저장하므로 여러 번 실행할 경우 데이터가 유지되지 않습니다. 에뮬레이터는 프로덕션 배포용이 아니며, 로컬 개발 및 테스트에서 Bigtable을 사용하는 데 도움을 주기 위한 것입니다.
에뮬레이터는 모든 Cloud Bigtable 클라이언트 라이브러리에서 사용할 수 있습니다.
에뮬레이터는 인스턴스와 클러스터 관리를 위한 관리 API를 제공하지 않습니다. 에뮬레이터가 시작된 후 프로젝트와 인스턴스 이름으로 에뮬레이터에 연결하여 테이블을 만들고 데이터를 읽거나 쓸 수 있습니다. 에뮬레이터는 보안 연결을 지원하지 않습니다.
에뮬레이터 설치 및 실행
에뮬레이터를 실행하는 가장 일반적인 두 가지 방법은 gcloud CLI 및 Docker를 사용하는 것입니다.
애플리케이션 개발 및 테스트 워크플로에 적합한 방법을 선택합니다.
인증 설정
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a
Cloud Shell
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the Google Cloud CLI
already installed and with values already set for
your current project. It can take a few seconds for the session to initialize.
gcloud CLI
최신 기능을 이용하려면 gcloud CLI 설치를 업데이트하세요.
gcloud components update beta
다음 명령어를 실행하여 에뮬레이터를 시작합니다.
gcloud beta emulators bigtable start
에뮬레이터가 이미 설치되지 않은 경우 에뮬레이터의 바이너리를 다운로드하여 설치하라는 메시지가 나타납니다.
에뮬레이터가 실행되고 있는 호스트와 포트 번호가 출력됩니다.
기본적으로 에뮬레이터는 localhost:8086을 선택합니다. 에뮬레이터를 특정 호스트 및 포트에 결합하려면 선택사항인 --host-port 플래그를 사용하고, HOST 및 PORT를 바꿉니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThe Google Cloud Bigtable emulator is a local, in-memory tool for testing applications, but it does not persist data across runs and should not be used for production.\u003c/p\u003e\n"],["\u003cp\u003eThe emulator can be started using either the gcloud CLI command \u003ccode\u003egcloud beta emulators bigtable start\u003c/code\u003e or via Docker with the command \u003ccode\u003edocker run -p 127.0.0.1:8086:8086 --rm -ti google/cloud-sdk gcloud beta emulators bigtable start --host-port=0.0.0.0:8086\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries connect to the emulator by setting the \u003ccode\u003eBIGTABLE_EMULATOR_HOST\u003c/code\u003e environment variable to the emulator's host and port, such as \u003ccode\u003elocalhost:8086\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe emulator supports most filters except the \u003ccode\u003eSink\u003c/code\u003e limiting filter, and issues can be tracked in the \u003ccode\u003egoogle-cloud-go\u003c/code\u003e GitHub repository.\u003c/p\u003e\n"],["\u003cp\u003eA Java wrapper is available for the emulator, providing a Java interface for writing tests, and its resources can be found in the GitHub repository \u003ccode\u003egoogleapis/java-bigtable\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Test using the emulator\n=======================\n\nThe [Google Cloud CLI](/sdk) provides a local, in-memory emulator for\nBigtable, which you can use to test your application. Because the\nemulator stores data only in memory, it won't persist data across runs. It is\nintended to help you use Bigtable for local development and\ntesting, not for production deployments.\n\nYou can use the emulator with all Cloud Bigtable client libraries.\n\nThe emulator does not provide administrative APIs to create or manage instances\nand clusters. After the emulator starts up, you can connect to it using any\nproject and instance name to create tables and read or write data. The emulator\ndoesn't support a secure connection.\n| **Note:** You can't use the emulator in the HBase shell.\n\nInstall and run the emulator\n----------------------------\n\nThe two most common ways to run the emulator are by using the\n[gcloud CLI](/sdk/gcloud/reference/beta/emulators/bigtable) and [Docker](https://www.docker.com).\nChoose the way that is appropriate for your application development and\ntest workflow.\n\n### Set up authentication\n\nIn the Google Cloud console, activate Cloud Shell.\n\n[Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n\nAt the bottom of the Google Cloud console, a\n[Cloud Shell](/shell/docs/how-cloud-shell-works)\nsession starts and displays a command-line prompt. Cloud Shell is a shell environment\nwith the Google Cloud CLI\nalready installed and with values already set for\nyour current project. It can take a few seconds for the session to initialize.\n\n### gcloud CLI\n\n1. Update your gcloud CLI installation to get the latest\n features:\n\n gcloud components update beta\n\n2. Run the following command to start the emulator:\n\n gcloud beta emulators bigtable start\n\n If the emulator is not installed already, you will be prompted to download\n and install the binary for the emulator.\n\n The emulator prints the host and port number where it is running.\n\n \u003cbr /\u003e\n\n By default, the emulator chooses `localhost:8086`. To bind the emulator to a\n specific host and port, use the optional `--host-port` flag, replacing\n \u003cvar translate=\"no\"\u003eHOST\u003c/var\u003e and \u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e: \n\n gcloud beta emulators bigtable start --host-port=\u003cvar translate=\"no\"\u003eHOST\u003c/var\u003e:\u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e\n\n The following is an example: \n\n gcloud beta emulators bigtable start --host-port=localhost:8086\n\n | **Note:** If you want to run multiple emulators, make sure that when you are starting the emulator, you specify the host and port explicitly.\n3. Type Control-C to stop the emulator.\n\n \u003cbr /\u003e\n\n### Docker\n\n1. Make sure [Docker](https://www.docker.com/products/docker-desktop)\n is installed on your system and available on the system path.\n\n2. Start the emulator:\n\n docker run -p 127.0.0.1:8086:8086 --rm -ti google/cloud-sdk gcloud beta emulators bigtable start --host-port=0.0.0.0:8086\n\n This command runs the emulator and maps the ports in the container to the\n same ports on your local host.\n\nYou can also use the emulator as part of your existing Docker Compose configuration (`.yaml`) file.\nFor more information about Docker Compose, see [Docker Compose Overview](https://docs.docker.com/compose/).\n\nUse the client libraries with the emulator\n------------------------------------------\n\nSet the `BIGTABLE_EMULATOR_HOST` environment variable to use the client libraries with the emulator: \n\n### Linux / macOS\n\n export BIGTABLE_EMULATOR_HOST=localhost:8086\n\n### Windows\n\n set BIGTABLE_EMULATOR_HOST=localhost:8086\n\nWhen your application starts, the client library automatically checks for\n`BIGTABLE_EMULATOR_HOST` and connects to the emulator if it is running.\n\nOnce `BIGTABLE_EMULATOR_HOST` is set, you can test the emulator by following the\n[hello world samples](/bigtable/docs/samples-python-hello).\n\nTo stop the emulator, type Control-C, then unset `BIGTABLE_EMULATOR_HOST` with the following command: \n\n unset BIGTABLE_EMULATOR_HOST\n\n### Java wrapper for the emulator\n\nThe Java wrapper bundles the built-in Bigtable emulator and provides\na Java interface to write tests.\n\nFor more information about using the Java wrapper, see the [GitHub repository](https://github.com/googleapis/java-bigtable/tree/main/google-cloud-bigtable-emulator).\n\nThe following documentation provides more information about the emulator Java packages:\n\n- [com.google.cloud.bigtable.emulator.core](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.core)\n- [com.google.cloud.bigtable.emulator.v2](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.v2)\n\nFilters\n-------\n\nThe emulator supports all filters, except the [`Sink`](/bigtable/docs/using-filters#sink) limiting filter.\n\nIssues related to the Bigtable emulator are tracked in the\n[google-cloud-go](https://github.com/googleapis/google-cloud-go/labels/api%3A%20bigtable) GitHub repository, where you can file bug\nreports and feature requests or comment on existing issues."]]