Skip to content

Commit

Permalink
Switch RubinUploadManagerImpl to use UploadLimits
Browse files Browse the repository at this point in the history
  • Loading branch information
stvoutsin committed Aug 22, 2024
1 parent 0537bae commit 0b36ceb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog.d/20240820_185747_steliosvoutsinas_DM_45153.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Changed

- Switch RubinUploadManagerImpl to use UploadLimits and set a default filesize limit of 32Mb
15 changes: 12 additions & 3 deletions tap/src/main/java/ca/nrc/cadc/sample/RubinUploadManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,25 @@
package ca.nrc.cadc.sample;

import ca.nrc.cadc.tap.BasicUploadManager;

import ca.nrc.cadc.tap.upload.UploadLimits;

public class RubinUploadManagerImpl extends BasicUploadManager {

/**
* Default maximum number of rows allowed in the UPLOAD VOTable.
*/
public static final int MAX_UPLOAD_ROWS = 100000;

public static final UploadLimits MAX_UPLOAD;

/**
* Use A filesize limit of 32 Mb using UploadLimits.
*/
static {
MAX_UPLOAD = new UploadLimits(32 * 1024L * 1024L); // 32 Mb
MAX_UPLOAD.rowLimit = MAX_UPLOAD_ROWS;
}

public RubinUploadManagerImpl() {
super(MAX_UPLOAD_ROWS);
super(MAX_UPLOAD);
}
}

0 comments on commit 0b36ceb

Please sign in to comment.