Interconnecting Flume with OBS
This section applies to MRS 3.x or later.
Before performing the following operations, ensure that you have configured a storage-compute decoupled cluster by referring to Configuring a Storage-Compute Decoupled Cluster (Agency) or Configuring a Storage-Compute Decoupled Cluster (AK/SK).
- Configure an agency.
- Log in to the MRS console. In the navigation pane on the left, choose Active Clusters.
- Click the name of a cluster to go to the cluster details page.
- On the Dashboard page, click Synchronize on the right of IAM User Sync to synchronize IAM users.
- Click Manage Agency on the right of Agency, select the target agency, and click OK.
- Create an OBS file system for storing data.
- Log in to the OBS console.
- In the navigation pane on the left, choose Parallel File Systems. On the displayed page, click Create Parallel File System.
- Enter the file system name, for example, esdk-c-test-pfs1, and set other parameters as required. Click Create Now.
- In the parallel file system list on the OBS console, click the created file system name to go to its details page.
- In the navigation pane on the left, choose Files and click Create Folder to create the testFlumeOutput folder.
- Prepare the properties.properties file and upload it to the /opt/flumeInput directory.
- Prepare the properties.properties file on the local host. Its content is as follows:# sourceserver.sources = r1# channelsserver.channels = c1# sinkserver.sinks = obs_sink# ----- define net source -----server.sources.r1.type = seqserver.sources.r1.spooldir = /opt/flumeInput# ---- define OBS sink ----server.sinks.obs_sink.type = hdfsserver.sinks.obs_sink.hdfs.path = obs://esdk-c-test-pfs1/testFlumeOutputserver.sinks.obs_sink.hdfs.filePrefix = %[localhost]server.sinks.obs_sink.hdfs.useLocalTimeStamp = true# set file size to trigger rollserver.sinks.obs_sink.hdfs.rollSize = 0server.sinks.obs_sink.hdfs.rollCount = 0server.sinks.obs_sink.hdfs.rollInterval = 5#server.sinks.obs_sink.hdfs.threadsPoolSize = 30server.sinks.obs_sink.hdfs.fileType = DataStreamserver.sinks.obs_sink.hdfs.writeFormat = Textserver.sinks.obs_sink.hdfs.fileCloseByEndEvent = false# define channelserver.channels.c1.type = memoryserver.channels.c1.capacity = 1000# transaction sizeserver.channels.c1.transactionCapacity = 1000server.channels.c1.byteCapacity = 800000server.channels.c1.byteCapacityBufferPercentage = 20server.channels.c1.keep-alive = 60server.sources.r1.channels = c1server.sinks.obs_sink.channel = c1Note
The value of server.sinks.obs_sink.hdfs.path is the OBS file system created in 2.
- Log in to the node where the Flume client is installed as user root.
- Create the /opt/flumeInput directory and create a customized .txt file in this directory.
- Log in to FusionInsight Manager.
- Choose Cluster > Name of the target cluster > Services > Flume. On the displayed page, click Configurations and then Upload File in the Value column corresponding to the flume.config.file parameter, upload the properties.properties file prepared in 3.a, and click Save.
- Prepare the properties.properties file on the local host. Its content is as follows:
- View the result in the OBS system.
- Log in to the OBS console.
- Click Parallel File Systems and go to the folder created in 2 to view the result.
Parent topic: Interconnecting MRS with OBS Using an Agency