ECS CAS testing

CAS on ECSLet’s test very basic CAS features on top of ECS.

  • Create a NameSpace
  • It is equal to a CAS ClusterECS CAS testing
  • Create a bucket
  • It is equal to a CAS Pool
  • Specify root user as the bucket owner
  • Enable CAS featureecs-cas-testing2
  • Create an object user
  • It is equal to a CAS Profile
  • Generate and set a password
  • Set the Default Bucketecs-cas-testing3
  • Generate PEA file and copy-paste it to the text file (.pea)ecs-cas-testing4
  • Configure bucket ACL for the object userecs-cas-testing5

c:\jcas>java -jar JCASScript.jar
 
CASScript>poolOpen 10.76.246.143?casprofile.pea
Attempting to connect to: 10.76.246.143?casprofile.pea
Connected to: 10.76.246.143?casprofile.pea
CASPool Properties:
Connection String: 10.76.246.143?casprofile.pea
Cluster Time: 2016.06.01 05:58:48 GMT
Buffer Size: 16384
Prefetch Buffer Size: 32768
Connection Timeout: 120000
Multi-Cluster Failover Enabled: True
Collision Avoidance Enabled: False
 
CASScript>filetoclip README.txt
Creating new clip with blob containing the file: README.txt
New Clip ID: DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL 
  • List all available C-clips
CASScript>query
Performing clip query
Query Expression Properties:
Start Time: UNBOUNDED
End Time  : UNBOUNDED
Type      : EXISTING
A3MOOJ0FH020QeEA05KQA0K85TPG41AK58JD00081CEE09BFC7405   2016.06.01 05:57:25 GMT
DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL   2016.06.01 06:06:52 GMT

Number of clips returned:     2
All results returned:         True
  • Open the C-clip
CASScript>clipOpen DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL
Clip Properties:
Name: CASScriptAutoClip
Creation Date:       2016.06.01 06:06:52 GMT
Size:                3382
Number of Tags:      1
Number of Blobs:     1
Retention Class:
Retention Seconds:   0
Modified:            False
EBR Enabled :        False
Retention Hold:      False
  • clipInfo command returns the same info as we get when open a clip
CASScript>clipInfo
Clip Properties:
Name: CASScriptAutoClip
Creation Date:       2016.06.01 06:06:52 GMT
Size:                3382
Number of Tags:      1
Number of Blobs:     1
Retention Class:
Retention Seconds:   0
Modified:            False
EBR Enabled :        False
Retention Hold:      False
  • You can change “name” attribute
  • But is doesn’t change the name of the C-clip

CASScript>clipAttribSet name NewName
Number of attributes: 19
Name: creation.poolid Value: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Name: retention.period Value: 0
Name: sdk.version Value: 3.2.607
Name: modification.poolid Value: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Name: type Value: Standard
Name: name Value: CASScriptAutoClip
Name: creation.date Value: 2016.06.01 06:06:52 GMT
Name: modification.date Value: 2016.06.01 06:06:54 GMT
Name: creation.profile Value: casprofile
Name: modification.profile Value: casprofile
Name: numfiles Value: 1
Name: totalsize Value: 3382
Name: refid Value: EDV1B7F3DGNLVF1IP0JMIUH4UL
Name: clusterid Value: 19999d80-37b2-3111-9c5d-7c053bc73f1a
Name: prev.clip Value:
Name: clip.naming.scheme Value: MD5
Name: numtags Value: 1
Name: app Value: transformation
Name: Name Value: NewName 
  • Use this command to change the name
CASScript>clipSetName README
New Clip name: README

CASScript>clipInfo
Clip Properties:
Name:                README
Creation Date:       2016.06.01 06:06:52 GMT
Size:                3382
Number of Tags:      1
Number of Blobs:     1
Retention Class:
Retention Seconds:   0
Modified:            True
EBR Enabled :        False
Retention Hold:      False
  • Writes a C-Clip to a file
CASScript>clipRawRead DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL clip.txt
Retrieving clip: DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL
Generated file: clip.txt
  • The C-clip content is written

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<ecml version="3.0">
<eclipdescription>
<meta name="creation.poolid" value="19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool"/>
<meta name="retention.period" value="0"/>
<meta name="sdk.version" value="3.2.607"/>
<meta name="modification.poolid" value="19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool"/>
<meta name="type" value="Standard" offset="0"/>
<meta name="name" value="CASScriptAutoClip"/>
<meta name="creation.date" value="2016.06.01 06:06:52 GMT"/>
<meta name="modification.date" value="2016.06.01 06:06:54 GMT"/>
<meta name="creation.profile" value="casprofile"/>
<meta name="modification.profile" value="casprofile"/>
<meta name="numfiles" value="1"/>
<meta name="totalsize" value="3382"/>
<meta name="refid" value="EDV1B7F3DGNLVF1IP0JMIUH4UL"/>
<meta name="clusterid" value="19999d80-37b2-3111-9c5d-7c053bc73f1a"/>
<meta name="prev.clip" value=""/>
<meta name="clip.naming.scheme" value="MD5"/>
<meta name="numtags" value="1"/>
<profile-meta name="app" value="transformation"/>
</eclipdescription>
<eclipcontents>
<AutoTag>
<eclipblob md5="E5ANEAMD5OI4Nx52JPLCJ7VNGQOG41AK594O010VF1IP0JMIUH4UL" size="3382" offset="0"/>
</AutoTag>
</eclipcontents>
</ecml> 
  • Writes blob associated with a C-Clip to a file
  • Content of the README.txt file is written
CASScript>clipToFile DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL blob.txt
Retrieving clip: DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL
Generated file: clip.txt
  • Delete the clip
CASScript>clipDel DGM8NT65K7A4Le21INOC3IQIB2JG41AK596R000VF1IP0JMIUH4UL
Clip deleted

CASScript>query
Performing clip query
Query Expression Properties:
Start Time: UNBOUNDED
End Time  : UNBOUNDED
Type : EXISTING

A3MOOJ0FH020QeEA05KQA0K85TPG41AK58JD00081CEE09BFC7405   2016.06.01 05:57:25 GMT

Number of clips returned:     1
All results returned:         True
  • CAS bucket parameters
CASScript>info
CASPool Attributes:
Capacity:          386547056640
Available Space:   150950429440
Cluster ID: 19999d80-37b2-3111-9c5d-7c053bc73f1a
Cluster Name: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster
Server Version:    5.1.2-2010-0-0
Replica Address:   10.76.246.143
  • Displays the pool (bucket) capabilities

CASScript>capabilities
CASPool Capabilities:
Supports Read Operations: True
Read Pools: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Supports Write Operations: True
Write Pools: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Supports Purge Operations: False
Purge Pools:
Supports Delete Operations: True
Delete Pools: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Supports Exist Operations: True
Exist Pools: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Supports Query Operations: True
Query Pools: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Supports PrivilegedDelete : True
PrivilegedDelete Pools: 19999d80-37b2-3111-9c5d-7c053bc73f1a-cascluster-caspool
Supports Monitor Operations: False
PoolMappings Pools:
PoolMappings Profiles:
Supports DeletionLogging : True
Default Retention Period: 0
Blob Naming Scheme: MG
Cluster Mode: basic
Minimum Fixed Retention: 0
 Maximum Fixed Retention: -1
Minimum Variable Retention: 0
Maximum Variable Retention: -1 
  • Monitor operations are not supported
CASScript>monitorDiscover
Accessing cluster discovery information...
SDK Error Occurred:
Error Number: -10005
System Error: 0
Error:        FP_SERVER_ERR
Error Class:  null
Trace: Networkpacket::receive(Connection&)<MonitorInfoTransaction.run<Cluster.GetClusterInfo<ClusterCloud::getClusterInfo(FPBasicGenericStream&,
TClusterInfo) with 6 retries<FPMonitor.GetDiscoveryInfo<FPMonitor_GetDiscoveryStream(-,-) 
  • Lets check how queries for a period of time work

CASScript>filetoclip README.txt
Creating new clip with blob containing the file: README.txt
New Clip ID: CNO75QHBD6NM2e8F5P63K7ASP87G41AK6V3F000NCQTRTEA3DE2KK
 
CASScript>query
Performing clip query
Query Expression Properties:
Start Time: UNBOUNDED
End Time : UNBOUNDED
Type : EXISTING
 
A3MOOJ0FH020QeEA05KQA0K85TPG41AK58JD00081CEE09BFC7405 2016.06.01 05:57:25 GMT
CNO75QHBD6NM2e8F5P63K7ASP87G41AK6V3F000NCQTRTEA3DE2KK 2016.06.01 09:49:50 GMT
 
Number of clips returned: 2
All results returned: True
 
CASScript>querySetLowerBoundGMT "2016.06.01 09:00:00"
Query Expression Properties:
Start Time: 2016.06.01 09:00:00 GMT
End Time : UNBOUNDED
Type : EXISTING
 
CASScript>query
Performing clip query
Query Expression Properties:
Start Time: 2016.06.01 09:00:00 GMT
End Time : UNBOUNDED
Type : EXISTING
 
CNO75QHBD6NM2e8F5P63K7ASP87G41AK6V3F000NCQTRTEA3DE2KK 2016.06.01 09:49:50 GMT
 
Number of clips returned: 1
All results returned: True 
  • BTW queries for a period of time feature is used for Transformation enumeration

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s