Harish Sharma created FLINK-35096:
-------------------------------------

             Summary: Flink OpenSearch Connector
                 Key: FLINK-35096
                 URL: https://issues.apache.org/jira/browse/FLINK-35096
             Project: Flink
          Issue Type: Bug
            Reporter: Harish Sharma


Hi Team,

I am trying to connect with the OS using the FLINK Java but as I dont find a 
way to pass theĀ IAM-ROLE for the OS cluster I am not able to create the index 
also it does not throw any exception.



Here is my code which I am trying to


final DataStream<Tuple4<String, String, Long, Long>> tupleSource = 
env.fromCollection(users);
final OpensearchSink<Tuple4<String, String, Long, Long>> sink =
new OpensearchSinkBuilder<Tuple4<String, String, Long, Long>>()
.setBulkFlushMaxActions(1)
.setHosts(new HttpHost("aws-cluster", 443, "https"))
.setEmitter( (element, ctx, indexer) -> {
indexer.add(
Requests
.indexRequest()
.index("users")
.id(element.f0)
.source(Map.ofEntries(
Map.entry("user_id", element.f0),
Map.entry("user_name", element.f1),
Map.entry("uv", element.f2),
Map.entry("pv", element.f3)
)));
})
.setAllowInsecure(true)
.setBulkFlushMaxActions(1)
.build();

Idly we do pass the assumeRole of the user once we wan to connect any of the 
managed service but I dont find a way role anywhere in the OS connector



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to