Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-14004

[CosmosDB] com.mongodb.MongoCommandException: Command failed with error 115: Command is not supported

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Invalid
    • 2.36.0
    • 2.36.0
    • io-java-mongodb
    • None

    Description

      You can't read cosmosdb collections using mongodb api because mongodb api doesn't support the  splitVector command.

       

       

      Sending command '{"splitVector": "test01.payment", "keyPattern": {"_id": 1}, "force": false, "maxChunkSize": 1}' with request id 22 to database test01 on connection [connectionId{localValue:6, serverValue:792577514}] to server cdb-test.documents.azure.com:10255

       

      com.mongodb.MongoCommandException: Command failed with error 115: 'Command is not supported.  ConnectionId fb598622-cc64-439a-affe-188c280c8e52  ActivityId: fde0dba1-0000-0000-0000-000000000000' on server cdb-test.documents.azure.com:10255. The full response is{"_t": "OKMongoResponse", "ok": 0,     "code": 115, "errmsg": "Command is not supported.  ConnectionId fb598622-cc64-439a-affe-188c280c8e52  ActivityId: fde0dba1-0000-0000-0000-000000000000", "$err": "Command is not supported.  ConnectionId fb598622-cc64-439a-affe-188c280c8e52  ActivityId: fde0dba1-0000-0000-0000-000000000000"}        at com.mongodb.internal.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:175)
              at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:303)
              at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:259)
              at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:99)
              at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:450)
              at com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:72)
              at com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:226)
              at com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:269)
              at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:131)
              at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:123)
              at com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:343)
              at com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:334)
              at com.mongodb.operation.CommandOperationHelper.executeCommandWithConnection(CommandOperationHelper.java:220)
              at com.mongodb.operation.CommandOperationHelper$5.call(CommandOperationHelper.java:206)
              at com.mongodb.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:463)
              at com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:203)
              at com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:198)
              at com.mongodb.operation.CommandReadOperation.execute(CommandReadOperation.java:59)
              at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:194)
              at com.mongodb.client.internal.MongoDatabaseImpl.executeCommand(MongoDatabaseImpl.java:194)
              at com.mongodb.client.internal.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:163)
              at com.mongodb.client.internal.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:158)
              at com.mongodb.client.internal.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:148)
              at org.apache.beam.sdk.io.mongodb.MongoDbIO$BoundedMongoDbSource.split(MongoDbIO.java:492)
              at org.apache.beam.runners.direct.BoundedReadEvaluatorFactory$InputProvider.getInitialInputs(BoundedReadEvaluatorFactory.java:216)
              at org.apache.beam.runners.direct.ReadEvaluatorFactory$InputProvider.getInitialInputs(ReadEvaluatorFactory.java:88)
              at org.apache.beam.runners.direct.RootProviderRegistry.getInitialInputs(RootProviderRegistry.java:80)
              at org.apache.beam.runners.direct.ExecutorServiceParallelExecutor.start(ExecutorServiceParallelExecutor.java:160)
              at org.apache.beam.runners.direct.DirectRunner.run(DirectRunner.java:213)
              at org.apache.beam.runners.direct.DirectRunner.run(DirectRunner.java:67)
              at org.apache.beam.sdk.Pipeline.run(Pipeline.java:323)
              at org.apache.beam.sdk.Pipeline.run(Pipeline.java:309)
              ...

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Miuler Hector Miuler Malpica Gallegos
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 12h 20m
                  12h 20m