Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Alias water-services-enriched as water-services

KQL

Code Block
POST /_aliases 
{
  "actions": [
    {
      "add": {
        "index": "water-services-enriched",
        "alias": "water-services"
      }
    }
  ]
}

...

cURL

Code Block
curl -X 

...

POST http://

...

elasticsearch-data-

...

v1.mgramseva:

...

 

...

9200/_aliases -d
'{
  "actions": [
    {
      "add": {
        "index": "water-services-enriched",
        "

...

alias": "

...

water-services

...

"
     

...

 

...

}
    }
  

...

]
}'

  • EChallan -Reindexing

    Delete the kafka connector if already exists with the kafka connection, using below command to delete connector.

    Code Block
    curl -X DELETE http://kafka-connect.mgramseva:8083/connectors/echallan-services-enriched-es-sink



    Kafka Connector Call to be runned from Playgroun pod

     

    Code Block
    curl --location --request POST 'http://kafka-connect.mgramseva:8083/connectors/' \
    --header 'Cache-Control: no-cache' \
    --header 'Content-Type: application/json' \
    --header 'Postman-Token: 419e68ba-ffb9-4da9-86e1-7ad5a4c8d0b9' \
    --data-raw '{
        "name": "echallan-services-enriched-es-sink",
        "config": {
            "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
            "type.name": "general",
            "tasks.max": "1",
            "max.retries": "15",
            "key.ignore": "true",
            "retry.backoff.ms": "5000",
            "max.buffered.records": "25",
            "typevalue.nameconverter": "generalorg.apache.kafka.connect.json.JsonConverter",
            "taskserrors.log.maxenable": "1true",
            "maxkey.retriesconverter": "15org.apache.kafka.connect.storage.StringConverter",
            "keyread.timeout.ignorems": "true100000",
            "retry.backoff.mstopics": "5000echallan-services-enriched",
            "max.bufferedbatch.recordssize": "25",
            "value.convertermax.in.flight.requests": "org.apache.kafka.connect.json.JsonConverter2",
            "errorsschema.log.enableignore": "true",
            "key.converterbehavior.on.malformed.documents": "org.apache.kafka.connect.storage.StringConverterwarn",
            "readflush.timeout.ms": "1000003600000",
            "topicserrors.deadletterqueue.topic.name": "echallan-services-enriched-failed",
            "batcherrors.sizetolerance": "25all",
            "maxvalue.inconverter.flightschemas.requestsenable": "2false",
            "schema.ignorename": "trueechallan-services-enriched-es-sink",
            "behavior.on.malformed.documentsconnection.url": "warnhttp://elasticsearch-data-v1.mgramseva:9200/",
            "flushlinger.timeout.ms": "36000001000",
            "errors.deadletterqueue.topic.nametransforms": "echallan-services-enriched-failedTopicNameRouter",
            "errors.tolerance": "all"transforms.TopicNameRouter.type": "org.apache.kafka.connect.transforms.RegexRouter",
            "valuetransforms.converterTopicNameRouter.schemas.enableregex": "falseechallan-services-enriched*",
            "nametransforms.TopicNameRouter.replacement": "echallan-services-enriched-es-sink",
        }
    }'
    


    Legacy Index call from postman by port forwarding egov-indexer pod

    Code Block
    curl --location  "connection.url": "--request POST 'http://localhost:8055/elasticsearchegov-data-v1.mgramseva:9200/",
            "linger.ms": "1000",
      indexer/index-operations/_legacyindex' \
    --header 'Content-Type: application/json' \
    --data-raw '{
         "transformsRequestInfo": "TopicNameRouter",{
            "transforms.TopicNameRouter.typeapiId": "org.apache.kafka.connect.transforms.RegexRouterstring",
            "transforms.TopicNameRouter.regexver": "echallan-services-enriched*string",
            "transforms.TopicNameRouter.replacementts": "echallan-services-enriched"null,
        } }' 
    Legacy Index call from postman
    Code Block
    curl --location --request POST 'http://localhost:8055/egov-indexer/index-operations/_legacyindex' \
    --header 'Content-Type: application/json' \
    --data-raw '{ "action": "string",
            "did": "string",
            "RequestInfokey": {"string",
            "apiIdmsgId": "string",
            "verauthToken": "stringca3256e3-5318-47b1-8a68-ffcf2228fe35",
            "tscorrelationId": null"e721639b-c095-40b3-86e2-acecb2cb6efb",
            "actionuserInfo": "string",{
                "didid": "string",23299,
                "keyuuid": "stringe721639b-c095-40b3-86e2-acecb2cb6efb",
                "msgIduserName": "string9337682030",
                "authTokenname": "ca3256e3-5318-47b1-8a68-ffcf2228fe35Abhilash Seth",
                "correlationIdtype": "e721639b-c095-40b3-86e2-acecb2cb6efbCITIZEN",
                "userInfomobileNumber": {"9337682030",
                "idemailId": 23299"abhilash.seth@gmail.com",
                "uuidroles": "e721639b-c095-40b3-86e2-acecb2cb6efb", [
                    "userName": "9337682030",{
                 "name": "Abhilash Seth",     "id": 281,
          "type": "CITIZEN",             "mobileNumbername": "9337682030Citizen",
                  "emailId": "abhilash.seth@gmail.com",
     }
               "roles": []
            }
        },
      {  "apiDetails": {
            "uri": "http://echallan-services.mgramseva:8080/echallan-services/eChallan/v1/_plainsearch",
            "idtenantIdForOpenSearch": 281"pb",
            "paginationDetails": {
                "nameoffsetKey": "Citizenoffset",
                    }
      "sizeKey": "limit",
             ]   "maxPageSize": 25,
        }     },     "apiDetailslimit":25
    {         "uri": "http://echallan-services.mgramseva:8080/echallan-services/eChallan/v1/_plainsearch"},
            "tenantIdForOpenSearchresponseJsonPath": "pb$.challans",
        },
        "paginationDetailslegacyIndexTopic": {
          "echallan-legacyIndex",
         "offsetKeytenantId": "offsetpb",
    }'
    

Delete the kafka connection after all the data has been re-indexed by follwing below command to delete connector

Code Block
 curl -X DELETE http://kafka-connect.mgramseva:8083/connectors/water-services-enriched-es-sink

Alias echallan-services-enriched as echallan-services

KQL

Code Block
POST /_aliases 

...

{
  "

...

actions": 

...

[
    {
      

...

"

...

add": 

...

{
        

...

"

...

index":

...

 "echallan-services-enriched",
        "

...

alias": "

...

echallan-services"
    

...

  

...

}
    }

...

 

...

 

...

]

...

}

cURL

Code Block

...

curl -X 

...

POST http://

...

elasticsearch-data-

...

v1.mgramseva:

...

Alias echallan-services-enriched as echallan-services

...

9200/_aliases -d
'{
  "actions": [
    {
      "add": {
        "index": "echallan-services-enriched",
        "alias": "echallan-services"
      }
    }
  ]
}'

  • Dss collection v2 re-indexing

...

Delete the kafka connector if already exists with the kafka connection, using below command to delete connector

Code Block
curl -X DELETE http://kafka-connect.mgramseva:8083/connectors/cms-case-es-sink9121 to delete connector



Kafka Connector call to be run from playground pod

...