Running a task locally or invoking it once

Hi,
I want to run a quartz job on the entries of my cache deleting them if they apply to some constraint. I guess I can do that in 2 ways:
1. run the quartz job on only 1 node which will call cache.invokeAll(filter, myProcessor). This node will send the entryProcessor to the other nodes that contain the relevant data.
Question: How can I make sure a quartz job is run on only one node as all nodes are running the same code and use the same configuration? I don't want to specify the same quartz job an all nodes because then the job would be invoked once for each node. Do I need to define some sort of election policy for that? Or are there better ways to handle a similar situation where only one node of a cluster needs to trigger some action?
2. run the quartz job on all nodes of the cluster. Each job will call cache.invokeAll(new KeyAssociatedFilter(filter), myProcessor) on every node. This will make sure the entryProcessor will only be executed on the own node's data. Will this work?
Best regards
Jan

Jan,
could you please describe your eviction criteria? If you want to remove the entries, then removing it by cache.removeAll() is the fastest approach, and for local only keys it automatically knows not to send to remote nodes, so you don't need the partition filter there.
On the other hand, as you described your eviction criteria in an earlier post to require decision on the content of the entire cache, in which case the prefiltering should not have a partitioned filter.
If your eviction criteria is the following: evict the number of keys from each category as the number of the surplus entries in the category, then PartitionFilter is not something you would want to use.
Instead, you can first do an aggregation on the count of keys in each category to find out the number of keys to be removed. This can easily be done by a GroupAggregator and a Count:
categorySizesByDiscriminator = cache.aggregate(GroupAggregator.createInstance("getCategoryDiscriminator", new Count()));where getCategoryDiscriminator is the name of the method (parentheses intentionally missing) which returns a different value for each category (was it getColor? ).
After this you know how many entries the surplus is.
You can now send a custom parallel aggregation which returns as many keys as the surplus from the category is from each node and throws away the unnecessary from the result (this is necessary because of the arbitrary distribution of the entries), something like this:
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.tangosol.io.ExternalizableLite;
import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;
import com.tangosol.util.ExternalizableHelper;
import com.tangosol.util.InvocableMap;
import com.tangosol.util.InvocableMap.EntryAggregator;
import com.tangosol.util.InvocableMap.ParallelAwareAggregator;
import com.tangosol.util.extractor.ReflectionExtractor;
public class ByCategoryToBeEvictedKeyHarvester implements
          ParallelAwareAggregator, PortableObject, ExternalizableLite {
     public static class PerNodeResultElement implements PortableObject, ExternalizableLite {
          private String categoryDiscriminator;
          private int currentCountPerCategory;
          private List<Object> keys;
          private transient int toBeEvictedFromCategory;
          public PerNodeResultElement() {
               super();
          private PerNodeResultElement(String categoryDiscriminator, int toBeEvictedFromCategory) {
               super();
               this.categoryDiscriminator = categoryDiscriminator;
               this.currentCountPerCategory = 0;
               this.keys = new ArrayList<Object>(toBeEvictedFromCategory);
               this.toBeEvictedFromCategory = toBeEvictedFromCategory;
          private void addEntry(InvocableMap.Entry entry) {
               if (toBeEvictedFromCategory < keys.size()) {
                    keys.add(entry.getKey());
               ++currentCountPerCategory;
          @Override
          public void readExternal(PofReader reader) throws IOException {
               categoryDiscriminator = reader.readString(0);
               currentCountPerCategory = reader.readInt(1);
               keys = (List<Object>) reader.readCollection(2, new ArrayList<Object>());
          @Override
          public void writeExternal(PofWriter writer) throws IOException {
               writer.writeString(0, categoryDiscriminator);
               writer.writeInt(1, currentCountPerCategory);
               writer.writeCollection(2, keys);
          @Override
          public void readExternal(DataInput input) throws IOException {
               categoryDiscriminator = ExternalizableHelper.readSafeUTF(input);
               currentCountPerCategory = ExternalizableHelper.readInt(input);
               int numKeys = ExternalizableHelper.readInt(input);
               keys = numKeys > 0 ? new ArrayList<Object>(numKeys) : Collections.EMPTY_LIST;
               while (numKeys > 0) {
                    keys.add(ExternalizableHelper.readObject(input));
                    --numKeys;
          @Override
          public void writeExternal(DataOutput output) throws IOException {
               ExternalizableHelper.writeSafeUTF(output, categoryDiscriminator);
               ExternalizableHelper.writeInt(output, currentCountPerCategory);
               ExternalizableHelper.writeInt(output, keys.size());
               for (Object key : keys) {
                    ExternalizableHelper.writeObject(output, key);
     private Map<String,Integer> toEvictByCategories;
     private String categoryDiscriminatorGetMethodName;
     private transient int toEvictAbove;
     public ByCategoryToBeEvictedKeyHarvester(
               String categoryDiscriminatorGetMethodName, Map<String, Integer> toEvictByCategories, int toEvictAbove) {
          super();
          this.toEvictByCategories = toEvictByCategories;
          this.categoryDiscriminatorGetMethodName = categoryDiscriminatorGetMethodName;
          this.toEvictAbove = toEvictAbove;
     private static class PerCategoryCounter {
          private int elementsPerCategory = 0;
          private LinkedList<Collection<Object>> keys = new LinkedList<Collection<Object>>();
          void addPerNodeResultElement(PerNodeResultElement element) {
               elementsPerCategory += element.currentCountPerCategory;
               keys.add(element.keys);
     @Override
     public Object aggregateResults(Collection results) {
          Map<String, PerCategoryCounter> temp = new HashMap<String, PerCategoryCounter>();
          int numKeysToRemove = 0;
          for (Object result : results) {
               Collection<PerNodeResultElement> perNodeResults = (Collection<PerNodeResultElement>) result;
               for (PerNodeResultElement perNodeResultElement : perNodeResults) {
                    String categoryDiscriminator = perNodeResultElement.categoryDiscriminator;
                    PerCategoryCounter counter = temp.get(categoryDiscriminator);
                    if (counter == null) {
                         counter = new PerCategoryCounter();
                         temp.put(categoryDiscriminator, counter);
                    int oldCount = counter.elementsPerCategory;
                    counter.addPerNodeResultElement(perNodeResultElement);
                    int newCount = counter.elementsPerCategory;
                    if (newCount > toEvictAbove) {
                         numKeysToRemove += newCount - (oldCount < toEvictAbove ? toEvictAbove : oldCount);
          // we now have a current view of how many elements there are (sort of)
          // and hopefully enough keys to evict (if there were not really too many entries added since then)
          ArrayList keysToRemove = new ArrayList(numKeysToRemove);
          for (PerCategoryCounter perCategoryCounter : temp.values()) {
               int elementsPerCategory = perCategoryCounter.elementsPerCategory;
               Iterator<Collection<Object>> iter = perCategoryCounter.keys.iterator();
               while (elementsPerCategory > toEvictAbove && iter.hasNext()) {
                    Collection<Object> keys = iter.next();
                    Iterator<Object> keyIter = keys.iterator();
                    while (elementsPerCategory > toEvictAbove && keyIter.hasNext()) {
                         keysToRemove.add(keyIter.next());
                         --elementsPerCategory;
          return keysToRemove;
     @Override
     public EntryAggregator getParallelAggregator() {
          return this;
     @Override
     public Object aggregate(Set entries) {
          final ReflectionExtractor extractor = new ReflectionExtractor(categoryDiscriminatorGetMethodName);
          Map<String,PerNodeResultElement> temp = new HashMap<String, PerNodeResultElement>();
          for (Object object : entries) {
               InvocableMap.Entry entry = (InvocableMap.Entry) object;
               String categoryDiscriminator = (String) entry.extract(extractor);
               Integer toBeEvictedFromCategory = toEvictByCategories.get(categoryDiscriminator);
               if (toBeEvictedFromCategory != null && toBeEvictedFromCategory > 0) {
                    PerNodeResultElement element = temp.get(categoryDiscriminator);
                    if (element == null) {
                         element = new PerNodeResultElement(categoryDiscriminator, toBeEvictedFromCategory);
                         temp.put(categoryDiscriminator, element);
                    element.addEntry(entry);
          return temp.values();
     @SuppressWarnings("unchecked")
     public void readExternal(PofReader reader) throws IOException {
          categoryDiscriminatorGetMethodName = reader.readString(0);
          toEvictByCategories = (Map<String, Integer>) reader.readMap(1, new HashMap<String, Integer>());
     @Override
     public void writeExternal(PofWriter writer) throws IOException {
          writer.writeString(0, categoryDiscriminatorGetMethodName);
          writer.writeMap(1, toEvictByCategories, String.class, Integer.class);
     @Override
     public void readExternal(DataInput input) throws IOException {
          categoryDiscriminatorGetMethodName = ExternalizableHelper.readSafeUTF(input);
          int numEntries = ExternalizableHelper.readInt(input);
          toEvictByCategories = new HashMap<String, Integer>();
          while (numEntries > 0) {
               String key = ExternalizableHelper.readSafeUTF(input);
               Integer value = ExternalizableHelper.readInt(input);
               toEvictByCategories.put(key, value);
               --numEntries;
     @Override
     public void writeExternal(DataOutput output) throws IOException {
          ExternalizableHelper.writeSafeUTF(output, categoryDiscriminatorGetMethodName);
          ExternalizableHelper.writeInt(output, toEvictByCategories.size());
          for (Map.Entry<String, Integer> entry : toEvictByCategories.entrySet()) {
               ExternalizableHelper.writeSafeUTF(output, entry.getKey());
               ExternalizableHelper.writeInt(output, entry.getValue());
}You can send this aggregator and remove the entries afterwards with:
String categoryDiscriminatorGetMethodName = "getColor"; // do I remember well?
// this is the map which you populate based on the result of the first aggregation,
// keys should be colors,
// values should be the number of entries in the category in the entire cache minus the eviction limit (the number of entries you want to evict from the category)
Map<String,Integer> toEvictByCategories = ...;
Collection<Object> keysToRemove = cache.aggregate(AlwaysFilter.INSTANCE, new ByCategoryToBeEvictedKeyHarvester(categoryDiscriminatorGetMethodName, toEvictByCategories, toEvictAbove));
cache.removeAll(keysToRemove);Best regards,
Robert

Similar Messages

  • List all running scheduled tasks on local/remote machine

    Hi All,
    I'm in need of a PS script, which can list all the active/running scheduled tasks either on local or remote machine.
    Please share if you have one readily available.
    Thanks in advance!!!
    Pavan

    Hi Pavan,
    Have you checked the script repository? That's a good place to find prewritten scripts:
    http://gallery.technet.microsoft.com/scriptcenter
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • SET UPDATE TASK LOCAL

    hi,
    I understand that when we use CALL function in UPDATE TASK....all the modifcations/database updations that are done in that FM are commited only once , at the end of the FM . there in no explicit commit work required.
    I went through sap help and many other sdn threads for understading the funationality of SET UPDATE TASK LOCAL...however i could not understand. Can anybody let me know the exact funationality of this with an example

    Hi
    The idea to run processes in Update task is guarantee system high availability.
    For more details you can check [Update Task documentation|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_UPDATE.htm]
    Best regards

  • How to get all AD User accounts, associated with any application/MSA/Batch Job running in a Local or Remote machine using Script (PowerShell)

    Dear Scripting Guys,
    I am working in an AD migration project (Migration from old legacy AD domains to single AD domain) and in the transition phase. Our infrastructure contains lots
    of Users, Servers and Workstations. Authentication is being done through AD only. Many UNIX and LINUX based box are being authenticated through AD bridge to AD. 
    We have lot of applications in our environment. Many applications are configured to use Managed Service Accounts. Many Workstations and servers are running batch
    jobs with AD user credentials. Many applications are using AD user accounts to carry out their processes. 
    We need to find out all those AD Users, which are configured as MSA, Which are configured for batch jobs and which are being used for different applications on
    our network (Need to find out for every machine on network).
    These identified AD Users will be migrated to the new Domain with top priority. I get stuck with this requirement and your support will be deeply appreciated.
    I hope a well designed PS script can achieve this. 
    Thanks in advance...
    Thanks & Regards Bedanta S Mishra

    Hey Satyajit,
    Thank you for your valuable reply. It is really a great notion to enable account logon audit and collect those events for the analysis. But you know it is also a tedious job when thousand of Users come in to picture. You can imagine how complex it will be
    for this analysis, where more than 200000 users getting logged in through AD. It is the fact that when a batch / MS or an application uses a Domain Users credential with successful process, automatically a successful logon event will be triggered in associated
    DC. But there are also too many users which are not part of these accounts like MSA/Batch jobs or not linked to any application. In that case we have to get through unwanted events. 
    Recently jrv, provided me a beautiful script to find out all MSA from a machine or from a list of machines in an AD environment. (Covers MSA part.)
    $Report= 'Audit_Report.html'
    $Computers= Get-ADComputer -Filter 'Enabled -eq $True' | Select -Expand Name
    $head=@'
    <title>Non-Standard Service Accounts</title>
    <style>
    BODY{background-color :#FFFFF}
    TABLE{Border-width:thin;border-style: solid;border-color:Black;border-collapse: collapse;}
    TH{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color: ThreeDShadow}
    TD{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color: Transparent}
    </style>
    $sections=@()
    foreach($computer in $Computers){
    $sections+=Get-WmiObject -ComputerName $Computer -class Win32_Service -ErrorAction SilentlyContinue |
    Select-Object -Property StartName,Name,DisplayName |
    ConvertTo-Html -PreContent "<H2>Non-Standard Service Accounts on '$Computer'</H2>" -Fragment
    $body=$sections | out-string
    ConvertTo-Html -Body $body -Head $head | Out-File $report
    Invoke-Item $report
    A script can be designed to get all scheduled back ground batch jobs in a machine, from which the author / the Owner of that scheduled job can be extracted. like below one...
    Function Get-ScheduledTasks
    Param
    [Alias("Computer","ComputerName")]
    [Parameter(Position=1,ValuefromPipeline=$true,ValuefromPipelineByPropertyName=$true)]
    [string[]]$Name = $env:COMPUTERNAME
    [switch]$RootOnly = $false
    Begin
    $tasks = @()
    $schedule = New-Object -ComObject "Schedule.Service"
    Process
    Function Get-Tasks
    Param($path)
    $out = @()
    $schedule.GetFolder($path).GetTasks(0) | % {
    $xml = [xml]$_.xml
    $out += New-Object psobject -Property @{
    "ComputerName" = $Computer
    "Name" = $_.Name
    "Path" = $_.Path
    "LastRunTime" = $_.LastRunTime
    "NextRunTime" = $_.NextRunTime
    "Actions" = ($xml.Task.Actions.Exec | % { "$($_.Command) $($_.Arguments)" }) -join "`n"
    "Triggers" = $(If($xml.task.triggers){ForEach($task in ($xml.task.triggers | gm | Where{$_.membertype -eq "Property"})){$xml.task.triggers.$($task.name)}})
    "Enabled" = $xml.task.settings.enabled
    "Author" = $xml.task.principals.Principal.UserID
    "Description" = $xml.task.registrationInfo.Description
    "LastTaskResult" = $_.LastTaskResult
    "RunAs" = $xml.task.principals.principal.userid
    If(!$RootOnly)
    $schedule.GetFolder($path).GetFolders(0) | % {
    $out += get-Tasks($_.Path)
    $out
    ForEach($Computer in $Name)
    If(Test-Connection $computer -count 1 -quiet)
    $schedule.connect($Computer)
    $tasks += Get-Tasks "\"
    Else
    Write-Error "Cannot connect to $Computer. Please check it's network connectivity."
    Break
    $tasks
    End
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($schedule) | Out-Null
    Remove-Variable schedule
    Get-ScheduledTasks -RootOnly | Format-Table -Wrap -Autosize -Property RunAs,ComputerName,Actions
    So I think, can a PS script be designed to get the report of all running applications which use domain accounts for their authentication to carry out their process. So from that result we can filter out the AD accounts being used for those
    applications. After that these three individual modules can be compacted in to a single script to provide the desired output as per the requirement in a single report.
    Thanks & Regards Bedanta S Mishra

  • ITunes 11.1 running in Task Manager but does NOT Open

    I have looked areound and no one seems to be having this problem (that I can tell).
    My problem started when I upgraded to iTunes 11.1 running Windows 8. When I tried to open iTunes, it never opens but if I open the Task Manager I can see it running (32-bit) with a couple other Apple programs. I have downloaded with both Firefox and Chrome.
    I have tried the following things:
    Completely uninstalled iTunes following the steps outline by Apple (included checking all folders for files).  Same thing happened when I re-installed.
    Tried to install as the Administrator.
    Tried to run using Windows 7 compatibility
    Refreshed my computer (erases and resets everything minus personal files) and installed iTunes 11.1 before anything. Did not work.
    Once or twice it would open but as soon as I closed and tried to re-open iTunes, same thing. Never opens but running in Task Manager.
    I have no idea what to do next and am running iTunes 11.1 on an OLD desktop that is not sustainable.
    Thanks in advance.

    Hello irie00,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Best of luck,
    Mario

  • Handle long-running EDT tasks (f.i. TreeModel searching)

    Note: this is a cross-post from SO
    http://stackoverflow.com/questions/9378232/handle-long-running-edt-tasks-f-i-treemodel-searching
    copied below, input highly appreciated :-)
    Cheers
    Jeanette
    Trigger is a recently re-detected SwingX issue (https://java.net/jira/browse/SWINGX-1233): support deep - that is under collapsed nodes as opposed to visible nodes only, which is the current behaviour - node searching.
    "Nichts leichter als das" with all my current exposure to SwingWorker: walk the TreeModel in the background thread and update the ui in process, like shown in a crude snippet below. Fest's EDT checker is happy enough, but then it only checks on repaint (which is nicely happening on the EDT here)
    Only ... strictly speaking, that background thread must be the EDT as it is accessing (by reading) the model. So, the questions are:
    - how to implement the search thread-correctly?
    - or can we live with that risk (heavily documented, of course)
    One possibility for a special case solution would be to have a second (cloned or otherwise "same"-made) model for searching and then find the corresponding matches in the "real" model. That doesn't play overly nicely with a general searching support, as that can't know anything about any particular model, that is can't create a clone even if it wanted. Plus it would have to apply all the view sorting/filtering (in future) ...
    // a crude worker (match hard-coded and directly coupled to the ui)
    public static class SearchWorker extends SwingWorker<Void, File> {
        private Enumeration enumer;
        private JXList list;
        private JXTree tree;
        public SearchWorker(Enumeration enumer, JXList list, JXTree tree) {
            this.enumer = enumer;
            this.list = list;
            this.tree = tree;
        @Override
        protected Void doInBackground() throws Exception {
            int count = 0;
            while (enumer.hasMoreElements()) {
                count++;
                File file = (File) enumer.nextElement();
                if (match(file)) {
                    publish(file);
                if (count > 100){
                    count = 0;
                    Thread.sleep(50);
            return null;
        @Override
        protected void process(List<File> chunks) {
            for (File file : chunks) {
                ((DefaultListModel) list.getModel()).addElement(file);
                TreePath path = createPathToRoot(file);
                tree.addSelectionPath(path);
                tree.scrollPathToVisible(path);
        private TreePath createPathToRoot(File file) {
            boolean result = false;
            List<File> path = new LinkedList<File>();
            while(!result && file != null) {
                result = file.equals(tree.getModel().getRoot());
                path.add(0, file);
                file = file.getParentFile();
            return new TreePath(path.toArray());
        private boolean match(File file) {
            return file.getName().startsWith("c");
    // its usage in terms of SwingX test support
    public void interactiveDeepSearch() {
        final FileSystemModel files = new FileSystemModel(new File("."));
        final JXTree tree = new JXTree(files);
        tree.setCellRenderer(new DefaultTreeRenderer(IconValues.FILE_ICON, StringValues.FILE_NAME));
        final JXList list = new JXList(new DefaultListModel());
        list.setCellRenderer(new DefaultListRenderer(StringValues.FILE_NAME));
        list.setVisibleRowCount(20);
        JXFrame frame = wrapWithScrollingInFrame(tree, "search files");
        frame.add(new JScrollPane(list), BorderLayout.SOUTH);
        Action traverse = new AbstractAction("worker") {
            @Override
            public void actionPerformed(ActionEvent e) {
                setEnabled(false);
                Enumeration fileEnum = new PreorderModelEnumeration(files);
                SwingWorker worker = new SearchWorker(fileEnum, list, tree);
                PropertyChangeListener l = new PropertyChangeListener() {
                    @Override
                    public void propertyChange(PropertyChangeEvent evt) {
                        if (evt.getNewValue() == SwingWorker.StateValue.DONE) {
                            //T.imeOut("search end ");
                            setEnabled(true);
                            ((SwingWorker) evt.getSource()).removePropertyChangeListener(this);
                worker.addPropertyChangeListener(l);
                // T.imeOn("starting search ... ");
                worker.execute();
        addAction(frame, traverse);
        show(frame)
    }

    At the end of the day, it turned out that I asked the wrong question (or right question in a wrong context ;-): the "problem" arose by an assumed solution, the real task to solve is to support a hierarchical search algorithm (right now the AbstractSearchable is heavily skewed on linear search).
    Once that will solved, the next question might be how much a framework can do to support concrete hierarchical searchables. Given the variety of custom implementations of TreeModels, that's most probably possible only for the most simple.
    Some thoughts that came up in the discussions here and the other forums. In a concrete context, first measure if the traversal is slow: most in-memory models are lightning fast to traverse, nothing needs to be done except using the basic support.
    Only if the traversal is the bottleneck (as f.i. in the FileSystemModel implementations of SwingX) additional work is needed:
    - in a truly immutable and unmodifiable TreeModel we might get away with read-only access in a SwingWorker's background thread
    - the unmodifiable precondition is violated in lazy loading/deleting scenarios
    there might be a natural custom data structure which backs the model, which is effectively kind-of "detached" from the actual model which allows synchronization to that backing model (in both traversal and view model)
    - pass the actual search back to the database
    - use an wrapper on top of a given TreeModel which guarantees to access the underlying model on the EDT
    - "fake" background searching: actually do so in small-enough blocks on the EDT (f.i. in a Timer) so that the user doesn't notice any delay
    Whatever the technical option to a slow search, there's the same usability problem to solve: how to present the delay to the end user? And that's an entirely different story, probably even more context/requirement dependent :-)
    Thanks for all the valuable input!
    Jeanette

  • Is there any BAPI calling only  ABAP command SET UPDATE TASK LOCAL

    Hi abapers
    we have a requirement to run SET UPDATE TASK LOCAL befor calling BAPI_ENTRYSHEET_CREATE command by JAVA through JCO.
    is there any BAPI that contains SET UPDATE TASK LOCAL command or simillar functionality.
    Thanks & Regards,
    Ramesh

    You could write a wrapper RFC function module which calls your BAPI and also the SET UPDATE TASK LOCAL.
    Regards,
    Rich Heilman

  • Update Row into Run Table Task is not executing in correct sequence in DAC

    Update Row into Run Table Task is not executing in correct sequence in DAC.
    The task phase for this task is "Post Lost" . The depth in the execution plan is 19 but this task is running some times in Depth 12, some times in 14 and some time in Depth 16. Would like to know is this sequence of execution is correct order or not? In the out of the Box this task is executed at the end of the entire load. No Errors were reported in DAC log.
    Please let me know if any documents that would highlight this issue
    rm

    Update into Run table is a task thats required to update a table called W_ETL_RUN_S. The whole intention of this table is to keep the poor mans run history on the warehouse itself. The actual run history is stored in the DAC runtime tables, however the DAC repository could be on some other database/schema other than warehouse. Its mostly a legacy table, thats being carried around. If one were to pay close attention to this task, it has phase dependencies defined that dictate when this task should run.
    Apologies in advance for a lengthy post.... But sure might help understanding how DAC behaves! And is going to be essential for you to find issues at hand.
    The dependency generation in DAC follows the following rules of thumb!
    - Considers the Source table target table definitions of the tasks. With this information the tasks that write to a table take precedence over the tasks that reads from a table.
    - Considers the phase information. With this information, it will be able to resolve some of the conflicts. Should multiple tasks write to the same table, the phase is used to appropriately stagger them.
    - Considers the truncate table option. Should there be multiple tasks that write to the same table with the same phase information, the task that truncates the table takes precedence.
    - When more than one task that needs to write to the table that have similar properties, DAC would stagger them. However if one feels that either they can all go in parallel, or a common truncate is desired prior to any of the tasks execution, one could use a task group.
    - Task group is also handy when you suspect the application logic dictates cyclical reads and writes. For example, Task 1 reads from A and writes to B. Task 2 reads from B and writes back to A. If these two tasks were to have different phases, DAC would be able to figure that out and order them accordingly. If not, for example those tasks need to be of the same phase for some reason, one could create a task group as well.
    Now that I described the behavior of how the dependency generation works, there may be some tasks that have no relevance to other tasks either as source tables or target tables. The update into run history is a classic example. The purpose of this task is to update the run information in the W_ETL_RUN_S with status 'Completed' with an end time stamp. Because this needs to run at the end, it has phase dependency defined on it. With this information DAC will be able to stagger the position of execution either before (Block) or after (Wait) all the tasks belonging to a particular phase is completed.
    Now a description about depth. While Depth gives an indication to the order of execution, its only an indication of how the tasks may be executed. Its a reflection of how the dependencies have been discovered. Let me explain with an example. The tasks that have no dependency will have a depth of 0. The tasks that depend on one or more or all of depth 0 get a depth of 1. The tasks that depend on one or more or all of depth 1 get a depth of 2. It also means implicitly a task of depth 2 will indirectly depend on a task of depth 0 through other tasks in depth 1. In essence the dependencies translate to an execution graph, and is different from the batch structures one usually thinks of when it comes to ETL execution.
    Because DAC does runtime optimization in the order in which tasks are executed, it may pick a task thats of order 1 over something else with an order of 0. The factors considered for picking the next best task to run depend on
    - The number of dependent tasks. For example, a task which has 10 dependents gets more priorty than the one whose dependents is 1.
    - If all else equal, it considers the number of source tables. For example a task having 10 source tables gets more priority than the one that has only two source tables.
    - If all else equal, it considers the average time taken by each of the tasks. The longer running ones will get more preference than the quick running ones
    - and many other factors!
    And of course the dependencies are honored through the execution. Unless all the predecessors of a task are in completed state a task does not get picked for execution.
    Another way to think of this depth concept : If one were to execute one task at a time, probably this is the order in which the tasks will be executed.
    The depth can change depending on the number of tasks identified for the execution plan.
    The immediate predecessors and successor can be a very valuable information to look at and should be used to validate the design. All predecessors and successors provide information to corroborate it even further. This can be accessed through clicking on any task and choosing the detail button. You will see all these information over there. As an alternate method, you could also use the 'All/immediate Predecessors' and 'All/immediate Successor' tabs that provide a flat view of the dependencies. Note that these tabs may have to retrieve a large amount of data, and hence will open in a query mode.
    SUMMARY: Irrespective of the depth, validate
    - if this task has 'Phase dependencies' that span all the ETL phases and has a 'Wait' option.
    - click on the particular task and verify if the task does not have any successors. And the predecessors include all the tasks from all the phases its supposed to wait for!
    Once you have inspected the above two you should be good to go, no matter what the depth says!
    Hope this helps!

  • Firefox 3.6.9 doesn't open but is running in task manager

    I received Animalware via µTorrent and was very busy cleaning up. I changed from AVG (because it let it slip by) to Avira Anti-Vir, ran MalwareBytes Anti-Malware, among other threat removers. In the beginning, none of the current browsers, as well as Outlook Express, were able to connect, but as I progressed with the cleaning operation, IE, Chrome, Safari & Outlook Express were able to connect. Firefox still doesn't open and displays no errors, but runs in Task Manager using 95% of the CPU. I am also running online scans from Trend Micro, Panda and bitDefender. Meanwhile, if anyone has any other suggestions, I would be very thankful.

    Make sure that you do not remove your personal data when you uninstall Firefox. Then you won't lose personal data stored in a different location in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder].
    See also http://kb.mozillazine.org/Profile_backup and [[Backing up your information]]
    A possible cause is security software (firewall) that blocks Firefox.<br />
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox.<br />
    See [[Server not found]] and [[Firewalls]] and http://kb.mozillazine.org/Firewalls
    See also http://kb.mozillazine.org/Browser_will_not_start_up
    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database.<br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

  • After reboot firefox won't start. runs in task manager, but won't pop up. reset, safe mode and uninstall/re-install won't help. ok if no reboot.

    win7 Pro. has been running firefox ok. but lately with 25 and now 26, the firefox won't start. I can see firefox is running in task manager. but it just won't pop up.
    if I download it again and install it, it will run, but every time I reboot the system, it just won't run again.
    try: reset, safe mode, uninstall & reinstall, new/clean profile, none of those work.

    There may be a corrupted file on Firefox.<br>
    Please attempt to perform a clean reinstall. <sup>[https://support.mozilla.org/en-US/kb/forum-response-clean-reinstall (More Details)]</sup> This is different than a regular uninstall.
    If a clean reinstall does not fix the issue, please try starting your operating system in safe mode.<br>
    To do so, please do the following:
    #Ensure that your computer is shut down completely
    #Press the power button
    #Tap the <code>F8</code> key repeatedly before the Windows logo and startup screen is displayed
    #Select Safe Mode With Networking for the advanced startup options list
    Please report back with the results of both solutions.

  • I need to run periodical task, how can I do so?

    I have an application running in BEA Weblogic Server, it's a portal application in fact.
    I log every login try to my portal.
    My next task is too make summary of the data I've collected (every 24 hours).
    So I would like to run some task every 24 hours.
    What can I do in Weblogic?

    You could use JMX timers, for example or EJB 2.0 Timers.
    Check out -
    http://e-docs.bea.com/wls/docs90/jmxinst/timer.html
    and
    http://java.sun.com/j2ee/1.4/docs/api/javax/ejb/Timer.html (you probably want to look this one up elsewhere as well)
    cheers,
    Deepak

  • SyncToy 2.1 Can't Find NAS Folder When Run From Task Scheduler

    I'm using SyncToy 2.1 to keep two WIN7 computers and a Synology DS414j NAS drive in sync. I have several folder pairs configured, some between the two PC's and three between one PC and the NAS drive. I have a task set up for automatic syncing. The problem
    is SyncToy can't find the destination folders on the NAS drive if it's run from Task Scheduler. If I run SyncToy manually, everything works fine. I've even tried opening the command prompt and running the exact same program Task Scheduler is running (SyncToyCmd.exe
    -R), and it works perfectly. But when Task Scheduler runs the task, it fails to find the NAS folders with the following error message:
    SYNC: 08/21/2014 14:12:26:140: *** Failed to execute folder pair Downloads to NAS. Could not locate folder \\DISKSTATION\Downloads\.
    I've been looking for days for a solution and have not found anyone with this problem. Any ideas?

    Hi Texxxas,
    Apparently the problem is not with SyncToy, it is with Task Scheduler. If you have had Task Scheduler work for you in the past, then I don't have an answer for that. I have never been able to get Task Scheduler to work correctly with SyncToy and a NAS drive.
    I have found that for some reason it works with USB external HDD's but will not work with a network connected hard drive. The same bug exists in Win8.1 as well. However, I have since found a third party task scheduler that works perfectly with SyncToy and
    my NAS drive. It is called System Scheduler by Splinterware. The free version only works when you are logged in but they have a paid version that runs as a service and will execute without being logged in. This has solved my problem.

  • Reading the output from a object running in the local machine.

    Reading the output from a object running in the local machine.
    By using a signed applet i am lunching a small application that returns an image object, how to read that without storing it in the hard disk.
    Which means i need to read the image object return by the local application using applet or jsp .
    i am using tomacat and an html page with an applet with it to lunch the application.

    You can write that image in a binary format using OutputStream for System.out and then read it in your applet.

  • ITunes won't load when I click, not running in "task manager"

    I have a Dell Inspiron 1545. I run on Windows 7. iTunes was operating normally for me until recently... just a few days ago, I discovered that iTunes wouldn't load when I clicked on the icon on my desktop. I've tried clicking on it from the start menu and trying to open a music file via iTunes as well. The most that will happen is that the "checking iTunes library" box will pop up, load for a little while, and disappear. My cursor will also make it appear that the computer is loading it for a few seconds, and then give up. When checking to see if the program was even running, my task manager doesn't list iTunes. I tried uninstalling iTunes and reinstalling iTunes to the current version (I may have been operating a version behind before), but 10.1 is behaving the same way. I am a music student that relies heavily on listening to iTunes for homework, so any advice ASAP would be GREATLY appreciated! Thank you!

    Quicktime is loading properly and plays videos just fine. Hmm... curiouser and curiouser!
    That is odd ... with the most common causes of an error message free iTunes launch failure, iTunes.exe persists in task manager. The one I check for when iTunes.exe isn't persisting will usually prevent the QuickTime Player from launching.
    Does the problem seem to be systemwide or user-specific, with those terms in the sense used in the following troubleshooting article?
    [iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues|http://support.apple.com/kb/TS1717]

  • Win 7 x64 Itunes and Quicktime Running in Task Manager nothing seen! Help

    Ok I'm running out of ideas- I' I have uninstalled multiple time various version of itunes. It upgraded to 10 automatically then a few days ago it wouldn't run. Looking in task manager itunes and intones helper are running. Thought a simple wipe and reinstall would solve it alas no. Been trying all week various reinstalls of different versions, all the same thing occurs, It appears to be a system wide fault. Disabled Bonjour enabled- no difference. Disabled all windows services aside form the apple ones - no difference. Started in safe mode- itunes refused to start. Gave up and reinstalled 7 and it worked until a reboot (and also it itunes store and ipod drivers for Win 7 x64 are not there) where the same probelm occured. Installed airport seeing if it would update the relevant dodgy files in Bonjour.
    Getting sick of finding why this is happening and I can't;t find where this bug is, and I've spent far too long trailing through the web trying to solve this and not one single one has worked so far!
    Please Help!!

    Sorry, Itunes+Quicktime the intaller neither of them will open (they appear to be running in task manager however). Downlaoding the sperate intaller for Quicktime, the installer on its own, then quicktime runs and opens.

Maybe you are looking for

  • SEND output of reports to email ids automatically

    After execution of a report i want it should be automatically send to emailids of some person. Can anyone tell me how to do this

  • Use of CLOB in WL 5.1

    Hello, I'm always getting this exception: java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Undeclared checked exception - with nested exception: [weblogic.rmi.ServerException: A remote exception occurred while executing the meth

  • Old email address showing in icloud and I can't see how to change it back to my address

    My son gave me his old iphone and we changed the name to my email address and Apple id etc. Yesterday I downloaded the new 7.0.2 update and now icloud is showing up as my sons old email address.  How do I change it back to my email address please?

  • Exported movie plays back fast

    Hi all, new poster on the apple discusions forum but wondered if anybody out there could help me. I created my first movie from iMovie last night, the footage is HD from A Sanyo Xacti 1000 camera (had problems getting the footage in the night before

  • Inability of dvd disc to play on other computers

    After burning a disc using premiere elements 2.0 it will not play in other computers. It will play on stand alone dvd players with a tv. but not on computers Why?? Am I missing something in the process?