首页 > 解决方案 > Druid - 防止在每次 CSV 摄取时创建新分区

问题描述

我有摄取规范

        "rollup": false,
        "segmentGranularity" : "day",
        "queryGranularity" : {
            "type": "duration",
            "duration": 60000
        }
      }
    },
    "ioConfig" : {
      "type" : "index",
      "inputSource" : {
        "type" : "local"
       },
       "inputFormat": {
         "type": "csv"
       },
       "appendToExisting": true
    }

每次我调用 API 摄取时,它都会创建新分区 在此处输入图像描述 有没有办法防止在每次摄取时创建新分区?

标签: druid

解决方案


分段是不可变的,因此您无法在摄取时避免这种情况。(德鲁伊不会写入现有段。)。不过,您可以稍后压缩这些片段,例如参见https://druid.apache.org/docs/latest/tutorials/tutorial-compaction.html。在较新的版本中,您还可以启用自动压缩。例如,请参阅https://docs.imply.io/3.0/on-prem/manage-data/compaction


推荐阅读