Invoke-ServiceFabricPartitionDataLoss

Invoke-ServiceFabricPartitionDataLoss

Invokes an action to induce data loss for a Service Fabric partition.

Syntax

Parameter Set: PartitionId
Invoke-ServiceFabricPartitionDataLoss -DataLossMode <DataLossMode> {PartialDataLoss | FullDataLoss} -PartitionId <Guid> -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNamePartitionNamed
Invoke-ServiceFabricPartitionDataLoss -DataLossMode <DataLossMode> {PartialDataLoss | FullDataLoss} -PartitionKey <String> -PartitionKindNamed -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNamePartitionSingleton
Invoke-ServiceFabricPartitionDataLoss -DataLossMode <DataLossMode> {PartialDataLoss | FullDataLoss} -PartitionKindSingleton -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNamePartitionUniformedInt
Invoke-ServiceFabricPartitionDataLoss -DataLossMode <DataLossMode> {PartialDataLoss | FullDataLoss} -PartitionKey <String> -PartitionKindUniformInt64 -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNameRandomPartition
Invoke-ServiceFabricPartitionDataLoss -DataLossMode <DataLossMode> {PartialDataLoss | FullDataLoss} -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]




Detailed Description

The Invoke-ServiceFabricPartitionDataLoss cmdlet induces data loss in a specified Service Fabric partition to test the data recovery path for a service. Whether data loss actually occurs depends on the DataLossMode option specified (FullDataLoss or PartialDataLoss) when invoking the cmdlet and whether you have any client operations running while this operation performs.

This action can only be performed for stateful services.

Before using this cmdlet, connect to the Service Fabric cluster.

Parameters

-DataLossMode<DataLossMode>

Specifies the data loss mode for the operation. The acceptable values for this parameter are:

-- PartialDataLoss
-- FullDataLoss


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PartitionId<Guid>

Specifies the ID of the partition on which to invoke the data loss.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PartitionKey<String>

Specifies the key of the partition on which to invoke the test.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PartitionKindNamed

Indicates that this cmdlet invokes data loss on a named partition.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PartitionKindSingleton

Indicates that this cmdlet invokes data loss on a singleton partition.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PartitionKindUniformInt64

Indicates that this cmdlet invokes data loss on a UniformInt64 partitioned service.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceName<Uri>

Specifies the name of the service to test.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-TimeoutSec<Int32]>

Specifies the time-out period, in seconds, for the operation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.Guid

    Represents the ID of a Service Fabric partition.


  • System.Uri

    Represents the name of a Service Fabric service.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.Object

    This cmdlet returns a System.Fabric.Testability.InvokeDataLossResult object that represents the operation result.


Examples

Example 1: Invoke full data loss on a named partition

This command invokes full data loss for the specified service.


PS C:\> Invoke-ServiceFabricPartitionDataLoss -ServiceName fabric:/TestSvc -PartitionKindNamed -PartitionKey "Partition3" -DataLossMode FullDataLoss

Example 2: Invoke full data loss on a UniformInt64 partition

This command invokes full data loss on a UniformInt64 partition.


PS C:\> Invoke-ServiceFabricPartitionDataLoss -ServiceName fabric:/TestSvc -PartitionKindUniformInt64 -PartitionKey "23" -DataLossMode FullDataLoss

Related topics

Show: