Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

4635

January 12th, 2009 06:00

fully deleting a clip

Hi, I am trying to delete a clip using the

emea1_profile1_rdqeDcw.pea

profile. For this I use the following code

      clip = new FPClip(this.centeraPool, clipId, FPLibraryConstants.FP_OPEN_ASTREE);

     

      int errors = 0;

      int numberOfBlobs = clip.getNumBlobs();

      if (numberOfBlobs > 0) {

        logger.trace(String.format("deleting %d tags of clip '%s'", numberOfBlobs, clipId));

       

        FPTag tag = null;

        while ((tag = clip.FetchNext()) != null) {

          try {

            if (tag.BlobExists() == 1) {

              logger.debug("deleting BLOB");

              tag.BlobPurge();

            }

           

            tag.Delete();

          } catch (Exception e) {

            errors++;

          } finally {

            close(tag);

          }

        }

      }

     

      close(clip);

      clip = null;

    

      if (errors > 0) {

        logger.warn(

          String.format("there have been %d errors while deleting tags of clip %s - the clip will not be deleted"

            , errors

            , clipId));

      } else {

        logger.info(

            String.format("all tags of clip %s have been deleted successfully, deleting clip itself", clipId));

       

        FPClip.AuditedDelete( this.centeraPool

          , clipId

          , String.format("%s/%s", this.applicationName, this.applicationVersion)

          , FPLibraryConstants.FP_OPTION_DEFAULT_OPTIONS);

      }

because the documentation states that the BLOB data of a clip will not be deleted by the clip.AuditedDelete resp. clipDelete methods.
When I run my code I get an

com.filepool.fplibrary.FPLibraryException: The use of this operation is restricted (transid='vie-vm-cre-ipc/25/PURGE_BLOB')

exception. Are there still rights missing with the  profile (rdqeDcw) I am using.
I have also taken a look at the DeleteContent sdk sample and this does neither delete the BLOBS nor the tags of the clip.
Which is the best method to completely remove a clip (and all its data) from Centera?
  best regards, Chris


January 13th, 2009 02:00

Hi Chris,

To remove a clip and its data, you can just call FPClip.Delete().

If FPClip.Delete() successfully deletes a clip, then existing Blob will be an orphan blob

(if there is no other clip refer to that blob). The garbage collection then removes

all orphan blobs periodically.

Because in the single instance, clip and blob may have many-to-many relationship,

i'd like to recommend you to not call BlobPurge() inside your application.

Best regards,

Henky

2 Intern

 • 

417 Posts

January 13th, 2009 03:00

Chris - Purge is only available on Basic edition, and this is the cause of the error you are seeing (as the online clusters are Compliance Edition models).

This API call is poitentially dangerous and has a very limited use case. With the latest versions of CentraStar (which incorporate more efficient Garbage Collection) then it is not necessary.

As Henky explained, you need only delete the Clip.

No Events found!

Top