简体   繁体   English

如何对无状态 Service Fabric 服务进行分区

[英]How partition a stateless Service Fabric service

I would like to partition a stateless Service Fabric service.我想对无状态Service Fabric 服务进行分区。 I didn't find how can I do that.我没有找到我该怎么做。 I want to set the number to 10 for example.例如,我想将数字设置为 10。

ApplicationManifest.xml应用程序清单.xml

  <Parameters>
    <Parameter Name="MyService_InstanceCount" DefaultValue="-1" />
    <Parameter Name="MyService_PartitionCount" DefaultValue="10" />
  </Parameters>

ApplicationManifest.xml应用程序清单.xml

<Parameters>
    ...
    <Parameter Name="MyService_PartitionCount" DefaultValue="10" />
</Parameters>
...
<Service Name="MyService" ServicePackageActivationMode="ExclusiveProcess">
    <StatelessService ServiceTypeName="MyServiceType" InstanceCount="[MyService_InstanceCount]">
        <UniformInt64Partition PartitionCount="[MyService_PartitionCount]" LowKey="0" HighKey="9" />
    </StatelessService>
</Service>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM