Hi all Hopefully someone with Minion tasks experie...
# troubleshooting
g
Hi all Hopefully someone with Minion tasks experience can chime in. I have been trying to implement a custom task for purging records. I took existing PurgeTask classes as a base, and managed to get it work. I hit one issue though. REALTIME segments cannot be updated even though API supports it. It appears the table type is lost, and it defaults to OFFLINE. I made this change
Copy code
@@ -158,7 +158,10 @@ public abstract class BaseSingleSegmentConversionExecutor extends BaseTaskExecut
           new BasicNameValuePair(FileUploadDownloadClient.QueryParameters.ENABLE_PARALLEL_PUSH_PROTECTION, "true");
       NameValuePair tableNameParameter = new BasicNameValuePair(FileUploadDownloadClient.QueryParameters.TABLE_NAME,
           TableNameBuilder.extractRawTableName(tableNameWithType));
-      List<NameValuePair> parameters = Arrays.asList(enableParallelPushProtectionParameter, tableNameParameter);
+      NameValuePair tableTypeParameter = new BasicNameValuePair(FileUploadDownloadClient.QueryParameters.TABLE_TYPE,
+              TableNameBuilder.getTableTypeFromTableName(tableNameWithType).toString());
+      List<NameValuePair> parameters = Arrays.asList(enableParallelPushProtectionParameter, tableNameParameter,
+              tableTypeParameter);
k
why do you want to update the real_time segments
g
We consume streaming data through CDC process (REALTIME with Upsert). Some records could be deleted. We update those records using ‘deleted’ column. We want to clean those out at some point.
BTW nothing in the code prevents processing REALTIME tables. It just throws exception that OFFLINE table does not exist when it tries to upload purged segments.
k
yeah, we had that limitation at some point and not any more. So looks like the check if artificial and can be removed.. would you mind submitting a fix?
g
I wouldn’t. But I guess there is a process to it. Let me read on it and I’ll do it.
k
thanks.. go ahead and submit a patch.. we will help
f
Hi bumping this ... So you mean that now (with a PR linked to this) realtime segments are editable ?
g
Sorry I was off for a couple days. Everything seems to be fine on my local.
f
No worry ! Really curious to see the PR linked to that 😉
g
Sorry I’m so slow. How do I submit a patch? Do I fork to my local, then submit PR to master? Would that work?
k
yes, that will work
g
I also bumped protobuf and grpc versions. Intended to submit separately. Forgot git would just merge the commits.