Azure Data Lake Storage

Azure Data Lake Storage

Azure Data Lake Storage Gen2(ADLS Gen2)에 저장된 파일에서 데이터를 가져오는 방법을 보여 주는 가이드예요.

출처: Azure Data Lake Storage

본문

pinot-adls 플러그인을 사용해 Azure Data Lake Storage를 활성화하세요. 컨트롤러나 서버에 다음 구성을 추가해요:

-Dplugins.dir=/opt/pinot/plugins -Dplugins.include=pinot-adls

참고 기본적으로 Pinot은 모든 플러그인을 로드하므로 플러그인을 그냥 놓기만 하면 돼요. 또한 -Dplugins.include를 지정하면 사용할 모든 플러그인을 넣어야 해요. 예: pinot-json, pinot-avro, pinot-kafka-3.0...

Azure Blob Storage는 다음 옵션을 제공해요:

  • accountName: 스토리지가 생성된 Azure 계정 이름.
  • accessKey: 인증에 필요한 액세스 키.
  • fileSystemName: 사용할 파일시스템 이름. 예를 들어 컨테이너 이름(S3의 버킷 이름과 유사).
  • enableChecksum: 검증용 MD5 체크섬 활성화. 기본값은 false.

이 속성들은 각각 pinot.[node].storage.factory.class.adl2. 접두사가 붙어야 하는데, node는 controller 또는 server예요:

pinot.controller.storage.factory.class.adl2.accountName=test-user

예제

잡 스펙

executionFrameworkSpec:
    name: 'standalone'
    segmentGenerationJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner'
    segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner'
    segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner'
jobType: SegmentCreationAndTarPush
inputDirURI: 'adl2://path/to/input/directory/'
outputDirURI: 'adl2://path/to/output/directory/'
overwriteOutput: true
pinotFSSpecs:
    - scheme: adl2
      className: org.apache.pinot.plugin.filesystem.ADLSGen2PinotFS
      configs:
        accountName: 'my-account'
        accessKey: 'foo-bar-1234'
        fileSystemName: 'fs-name'
recordReaderSpec:
    dataFormat: 'csv'
    className: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReader'
    configClassName: 'org.apache.pinot.plugin.inputformat.csv.CSVRecordReaderConfig'
tableSpec:
    tableName: 'students'
pinotClusterSpecs:
    - controllerURI: 'http://localhost:9000'

컨트롤러 구성

controller.data.dir=adl2://path/to/data/directory/
controller.local.temp.dir=/path/to/local/temp/directory
controller.enable.split.commit=true
pinot.controller.storage.factory.class.adl2=org.apache.pinot.plugin.filesystem.ADLSGen2PinotFS
pinot.controller.storage.factory.adl2.accountName=my-account
pinot.controller.storage.factory.adl2.accessKey=foo-bar-1234
pinot.controller.storage.factory.adl2.fileSystemName=fs-name
pinot.controller.segment.fetcher.protocols=file,http,adl2
pinot.controller.segment.fetcher.adl2.class=org.apache.pinot.common.utils.fetcher.PinotFSSegmentFetcher

서버 구성

pinot.server.instance.enable.split.commit=true
pinot.server.storage.factory.class.adl2=org.apache.pinot.plugin.filesystem.ADLSGen2PinotFS
pinot.server.storage.factory.adl2.accountName=my-account
pinot.server.storage.factory.adl2.accessKey=foo-bar-1234
pinot.server.storage.factory.adl2.fileSystemName=fs-name
pinot.server.segment.fetcher.protocols=file,http,adl2
pinot.server.segment.fetcher.adl2.class=org.apache.pinot.common.utils.fetcher.PinotFSSegmentFetcher

Minion 구성

storage.factory.class.adl2=org.apache.pinot.plugin.filesystem.ADLSGen2PinotFS
storage.factory.adl2.accountName=my-account
storage.factory.adl2.fileSystemName=fs-name
storage.factory.adl2.accessKey=foo-bar-1234
segment.fetcher.protocols=file,http,adl2
segment.fetcher.adl2.class=org.apache.pinot.common.utils.fetcher.PinotFSSegmentFetcher

더 알아보기 (Learn more)